Documentation for MEMail.Message

daughtkom
Posts: 14
Joined: Fri Aug 23, 2002 11:16 am

Documentation for MEMail.Message

Postby daughtkom » Wed Sep 25, 2002 10:04 am

Are there some docs that describe all of the methods and properties of MEMail.Message? I've seen a few examples in the forums, but am looking for more detail -- specifically with regard to multi-part messages (both plain and html).

Admin
Site Admin
Posts: 794
Joined: Mon Jun 10, 2002 6:31 pm
Location: Melbourne, Victoria, Australia

Postby Admin » Wed Sep 25, 2002 3:25 pm

Check out the Profession Edition Guide which is installed when you install MailEnable Professional. Start->Program Files->Mail Enable->Professional Edition - Guide by default. It lists all the properties and methods of the object.

daughtkom
Posts: 14
Joined: Fri Aug 23, 2002 11:16 am

Multiple part messages

Postby daughtkom » Wed Sep 25, 2002 4:07 pm

Does this component allow multiple part messages? I don't see that mentioned in the docs, but was wondering if it might be undocumented functionality.

What I am wanting to do is something like:

Code: Select all

<%
Dim oMail
Set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = "peter@mailenable.com"
oMail.MailFromDisplayName = "Test Account"
oMail.MailTo = "peter@mailenable.com"
oMail.Subject = "Welcome to our service"

oMail.Part(0).ContentType = "text/plain;"
oMail.Part(0).MessageBody = "Hello there," & vbcrlf & "Welcome to our
new service."

oMail.Part(1).ContentType = "text/html;"
oMail.Part(1).MessageBody = "<html><body><h1>Hello there,<BR>Welcome to our
new service.</h1></body></html>"

oMail.SendMessage
%>


Or, alternatively, something like:

Code: Select all

<%
Dim oMail
Set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = "peter@mailenable.com"
oMail.MailFromDisplayName = "Test Account"
oMail.MailTo = "peter@mailenable.com"
oMail.Subject = "Welcome to our service"
oMail.PlainMessageBody = "Hello there," & vbcrlf & "Welcome to our
new service."
oMail.HTMLMessageBody = "<html><body><h1>Hello there,<BR>Welcome to our
new service.</h1></body></html>"
oMail.SendMessage
%>


If this is not currently available functionality, I would like to suggest it. I would prefer the first method, as it allows more flexibility to the developer.

DJVan
Posts: 10
Joined: Mon Jul 29, 2002 4:36 am
Location: Ottawa, Ontario Canada

Problems with Images....

Postby DJVan » Thu Sep 26, 2002 7:44 am

I had to get this to work by adding "" "" double quotes around items within the HTML message...hence a mail subscription service.

Lastly is a button to confirm then a footer image.
The Confirm button comes through, but the last image does not.
It shows a place holder in the email but no image...

Any ideas.?
DVanRemortel
email: davidvan@backland.net

sunpost
Posts: 438
Joined: Wed Sep 04, 2002 3:04 pm

Postby sunpost » Sat Sep 28, 2002 9:21 pm

try this...

Code: Select all

BOUNDARY    = "----xxxxxx"
TEXT_HEADER = "--" & BOUNDARY & VBCrLf & "Content-Type: text/plain;" & VBCrLf & _
              "Content-Transfer-Encoding: 7bit" & VBCrLf & VBCrLf
HTML_HEADER = "--" & BOUNDARY & VBCrLf & "Content-Type: text/html;" & VBCrLf & _
              "Content-Transfer-Encoding: 7bit" & VBCrLf & VBCrLf
MP_FOOTER   = "--" & BOUNDARY & "--" & VBCrLf

strTextBody = "text format..."

strHTMLBody = "<html><head><title>HTML format</title></head>" & _
                "<body bgcolor=""Black"" text=""Yellow"" link=""#0000FF"" vlink=""#800080"">" & _
                "<font face=""Arial""><b>HTML format..." & _
                "</body></html>"

strBody = TEXT_HEADER & strTextBody & VBCrLf & HTML_HEADER & strHTMLBody & VBCrLf & MP_FOOTER

set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = "postmaster"
oMail.ContentType = "multipart/alternative; boundary=""" & BOUNDARY & """"
oMail.MailFromDisplayName = "Update Account"
oMail.MailTo = "foo@bar.com"
oMail.Subject = "Multipart"
oMail.MessageBody = strBody
oMail.SendMessage

Who is online

Users browsing this forum: No registered users and 4 guests