Help: E-mail through webspeed

Quintessence

New Member
Hi everybody,

I am using the following code to send an email through webspeed using outlook. The code works and sends the email, however, I want the Outlook message window to open so that the user can edit the body before sending, instead of the program sending automatically. It was suggested in another thread to remove 'h_objoutlookmsg:SEND.', but this doesn't seem to work.

I don't want to use MAPI or mailto:.

DEF VAR h_objoutlook AS COM-HANDLE NO-UNDO.
DEF VAR h_objoutlookmsg AS COM-HANDLE NO-UNDO.
DEF VAR h_objoutlookrecip AS COM-HANDLE NO-UNDO.

CREATE "Outlook.Application" h_objoutlook.

h_objoutlookmsg = h_objoutlook:CreateItem(0).
h_objoutlookrecip =
h_objoutlookmsg:Recipients:Add("mhowes@corp-sec.com").
h_objoutlookrecip:Type = 1.
h_objoutlookmsg:Subject = "Test send Subject".
h_objoutlookmsg:Body = "<message_contents>".
h_objoutlookrecip:Resolve.
h_objoutlookmsg:SEND.
h_objoutlook:Quit().

RELEASE OBJECT h_objoutlook.
RELEASE OBJECT h_objoutlookmsg.
RELEASE OBJECT h_objoutlookrecip.




Thanks
Michael
 
To edit a message you need Outlook to run on the client (the machine with the web browser).... WebSpeed however runs on your web server, which may sit on the other side of the world and has no control over what happens on the client -- With COM objects in WebSpeed you cannot open Outlook on the client.
 
Thanks for the reply. I see, I didn't consider that.

All I want to do it hit an 'email' button from within my webspeed app and e-mail the details on the page using Outlook so that the recipient/body can be altered. ie: The message must pop up with all the details in the body and then the user must send manually. I was using the mailto: function but was limited by the number of chars I could put into the body.

Any ideas would be appreciated

Thanks
Michael
 
There is a bit of code out there that allows you to send email from within WebSpeed (not sure where, I would have to find it as well since it has been a while since I last looked for it). With that you could create your own little "email" page in WebSpeed that allows the user to change the recipients and message body and you can have WebSpeed send the email on submit of the form. This will not have all the functionality that Outlook has, but it should at least allow you to do something similar to what you want...
 
Thanks for your help. I do have some code which does something similar to what you mentioned. I really wanted to open outlook so that the user could access his address book. I may have to compromise and use something like that.

My only other option now is to find a Javascript function that can access Outlook client side, without the limitations of mailto:. I'm not sure if such a function exists.

Thanks
Michael
 
Hi Michael,

Is what you are building an intranet or internet application? Reason for asking this is that when you create an intranet app, you may be quite certain that all computers that access you app do have Outlook installed and all people are in fact using it (for instance because it is company policy to use Outlook).

When building an internet app though, so one that can be accessed by many people with many different computer configurations, you can never just assume that Outlook is available and/or used as a mail application. Some people use Linux or Mac computers and some do use Windows but use other mail applications such as Eudora, Notes or whatever else there is around. This means that relying on Outlook (if you are able to open it at all using a script) will make your app not work for those people
 
jongpau,

It is an internet app, however, we have stipulated certain requirements to the users, ie: using IE 5.5 and above. (even though I despise IE). The app isn't being used by the general public, only by our clients, so from that point of view I guess it is like an intranet app.

Michael
 
Good thing I am not one of your clients; I use Opera for this forum because there are some issues with spaces being removed in FireFox. But that sofar only happens with the ProgressTalk implementation of the forum. I personally use FireFox for just about everything else. The only real reason I have IE on my system is because it comes with Windoze :eek: I hope for you that you can keep those system requirements up for all your current and future clients; a lot of people/businesses have been moving away from IE, Outlook etc over the past year or so.
 
I agree, unfortunately I don't get to make all the decisions here. I also use Firefox for just about everything, and only use IE for developing this app.
 
Back
Top