Page 1 of 1

Newby prob. : how can I display an email before sending it ?

Posted: Sun Jan 04, 2009 1:11 am
by fonkfonk
Hello,

I need to create a prog for my job that would ask a few informations for email creation (recipients, object, email body and attachment) but I need to display it in my email client (should be Outlook 2003) before sending it.

I didn't find this kind of information in the help file. I use Purebasic 4.30.

Thanks in advance for your help.

Pierre

Posted: Sun Jan 04, 2009 3:26 am
by Joakim Christiansen
You can do like this:

Code: Select all

RunProgram("mailto:email@domain.com?subject=Title&body=Hello world")
Not sure if this is exactly what you want, but it should be better than nothing. More information here btw:
http://www.ianr.unl.edu/internet/mailto.html or just Google mailto for help.

Posted: Sun Jan 04, 2009 4:19 am
by fonkfonk
Thanks for this workaround, Joakim, but I was wondering if createmail would allow such an option ...

Regards,

Pierre

Posted: Sun Jan 04, 2009 8:26 am
by superadnim
You could try and see which file formats does outlook read as email files and then write your email in a temporary file, then RunProgram() if the extension is correctly associated to outlook, you'll see it open in outlook.

It's a clean solution, otherwise you might have to use an interface or something nasty like that. I do hate temps, but many programs use them. You have to think whether it's worth spending 3 days working on a routine that will open your email in outlook or whether that time could be used for something a little bit more productive.