sending HTML mail

mfstuart mfstuart at cox.net
Fri Apr 24 19:38:21 EDT 2009


Hi Sadhu,
If you are on Windows, here's a VBScript that allows HTML body content:

=========================
Dim objOutl
Dim strHTML
Set objOutl = CreateObject("Outlook.Application")
Set objMailItem = objOutl.CreateItem(olMailItem)

strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "NEW MESSAGE</br>"
strHTML = strHTML & "<hr>"
strHTML = strHTML & "This is a test message"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

'comment the next line if you do not want to see the outlook window
objMailItem.Display
strEmailAddr  = "me at mycompany.com"
objMailItem.Recipients.Add strEmailAddr
objMailItem.Subject = "Hi"
objMailItem.HTMLBody = strHTML
'objMailItem.Attachments.Add "file.xml"
'objMailItem.Send
Set objMailItem = nothing
Set objOutl = nothing
=========================

HTH you,
Mark Stuart



Sadhu Nadesan wrote:
> 
> Sarah, Mikey, or anyone?
> 
> Say, I know this question gets asked a lot.  I have been searching the 
> mailing list, downloading stacks, etc., but haven't found the exact 
> answer so pardon me for asking it again!  The closest thing was Mikey's 
> post. (below)
> 
> The question is, how to send an HTML email message.  Or rather, a nicely 
> formatted message. Same thing I guess.   I think the revMail command is 
> awesome, but, the plain text message body looks kinda ugly for the 
> message I have in mind, and, although I could write a CGI script and 
> work out all the plumbing (actually I have done this before, a la 
> Sivakatirswami), I'd rather find a stack like Sarah's that is already 
> done and talks directly to the mail server without the CGI piece.  Am I 
> lazy, well, ,maybe so, I just don't want to reinvent the wheel when it's 
> been done. Plug and go!  I have enough plumbing to create as it is.
> 
> I am pretty hopeful someone has modified Sarah's stack or has something 
> ready to go that will send HTML mail and can be grafted onto one's rev 
> app.  Yes??  Are you willing to share, whoever you are?  Fingers 
> crossed, and, Mahalo!
> 
> Sadhu
> 
> ps, the post below was good but refers to stuff I didn't find yet, eg,  
> "as previously suggested' etc.  I can keep looking though.
>> From: Mikey <mikeythek at ... 
>> <http://gmane.org/get-address.php?address=mikeythek%2dRe5JQEeQqe8AvxtiuMwx3w%40public.gmane.org>>
>> Subject: Re: HTML SMTP Library 
>> <http://news.gmane.org/find-root.php?message_id=%3c9b408d8e0809021745n67481f69uf1a6c9e703954a9d%40mail.gmail.com%3e>
>> Newsgroups: gmane.comp.ide.revolution.user 
>> <http://news.gmane.org/gmane.comp.ide.revolution.user>
>> Date: 2008-09-03 00:45:52 GMT (33 weeks, 2 days, 18 hours and 21 
>> minutes ago)
>> I've got other things that I have to do tonight, so I can't give you
>> the complete cookbook, but here is the outline.
>> 1) Download one of the following stacks:
>>      a) http://www.gadgetplugins.com/altplugins/altEmailHarness.rev
>>      b) http://www.troz.net/Rev/libraries/*SMTP**library*.rev.gz
>> <http://www.troz.net/Rev/libraries/SMTPlibrary.rev.gz>
>> 2) After looking through the *SMTP* *Library* Demo (the second one), and
>> clicking on the *Library* button, I got into Sarah's *SMTP* *library*. 
>> I'm
>> sure this works just as well with the other, but as I said, I've got
>> other pressing things to do tonight.  However, you should be able to
>> figure it out after this.
>> 3) Search for "Content-Type".  Change it as I've previously suggested.
>> 4) Follow my formatting suggestions for the body.
>> 5) Send *HTML*-formatted emails without having to embed the *HTML* in an
>> attachment.
>>   
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/sending-HTML-mail-tp23223180p23226518.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list