Dominio Sending HTML messages

Source: Internet
Author: User

Recently found on the Internet to send HTML code of the mail, issued today, everyone sharing


1) Method One

Http://ozinisle.blogspot.com/2010/11/send-html-content-as-mail-using-lotus.html

2) Method Two

http://www.codestore.net/store.nsf/unid/BLOG-20091022-0419


The Web proxy calls the following Dim Session as New Notessessiondim Curdoc as Notesdocumentdim Db as NotesDatabase Dim url As String Dim Link as Stringset curdoc=session.documentcontexturl=strleft (Db.httpurl, "? OpenDatabase ") +_"/x_notice.xsp?action=opendocument&documentid= "+curdoc.universalidlink=" <a href= "" +url+ "" "target=" "_blank" "> Document link </a>" Call Cbasic.sendhtmlcontentasmail (Curdoc.yauditor (0), "", "", _ "notification, Subject: [" &curdoc.yformname (0) & "], current status:" &curdoc.status (0), link) call Curdoc.save (True,false) Function Sendhtmlcontentasmail (recipients as variant,ccto as variant,bccto as Variant, _subject as string,bodyhtmlcontent as Strin g) ' Declare Variables Dim s as New Notessessiondim DB as Notesdatabasedim body as Notesmimeentitydim stream as Notesstreamd Im host as StringDim message as NotesDocument on Error GoTo errhandlerset db = S.currentdatabaseset message=db. CreateDocument ' Capture the server name and filepath for use in Urlsdim ServerName as New notesname (db. Server) host = "Http://"+ servername.common &". com "s.convertmime = False ' do not convert MIME to rich textset stream = S.createstreams ET BODY = message. Createmimeentitymessage.subject =subjectmessage.sendto =recipientsmessage. CopyTo =cctomessage.blindcopyto =bcctomessage.recnooutofoffice = "1" Call stream. WRITETEXT (bodyhtmlcontent) ' Ensure the MIME content would be being recognized as HTML (must be after the stream is written) Cal L body. Setcontentfromtext (Stream, "Text/html;charset=utf-8", Enc_none) call message. Send (False) s.convertmime = True ' Restore conversionexit functionerrhandler:msgbox error,,cstr (Erl) Exit functionend Fun Ction






Dominio Sending HTML messages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.