This topic is locked

HTML Format for Email

5/11/2009 10:37:35 AM
ASPRunnerPro General questions
N
NigelEtienne author

Hi I have just upgraded to 6.1 build 1916 and wanted to know how I cahnge email formats to HTML. In 6.0 I edited commonfuntions and changed textbody to be htmlbody. I cannot find textbody in the "new" commonfunctions.asp file in 6.1

Sergey Kornilov admin 5/11/2009

An excerpt from ASPRunnerPro documentation:
You can send HTML email as well:

// ********** Send HTML email ************

set params = CreateObject("Scripting.Dictionary")

params("to")="test@test.com"

params("subject")="Sample subject"

params("htmlbody")="<body><html><p>Hello there</p>Best regards</body></html>"

params("charset")="UTF-8"

runner_mail(params)


More info on runner_mail function:
function runner_mail (params) - ASPRunnerPro wrapper for email function
params: Scripting.Dictionary object with input parameters.
The following parameters are supported:
from: Sender email address. If none specified an email address from the wizard will be used.
to: Receiver email address.
body: Plain text message body.
htmlbody: Html message body (do not use 'body' parameter in this case).
charset: Html message charset. If none specified the default website charset will be used.
Returns:
Scripting.Dictionary with the following data:
mailed: (True or False) indicates wheter mail sent or not
source: error source (Err.Source)
number: error number
description: error description
message: formatted message with all of above
Example with error handling:

set params = CreateObject("Scripting.Dictionary")

params("to")="test@test.com"

params("subject")="Sample subject"

params("body")="Hello there" & vbcrlf & "Best regards"

set result = runner_mail(params)

if not result("mailed") then

response.write result("message")

end if
N
NigelEtienne author 5/12/2009

An excerpt from ASPRunnerPro documentation:

You can send HTML email as well:

// ********** Send HTML email ************

set params = CreateObject("Scripting.Dictionary")

params("to")="test@test.com"

params("subject")="Sample subject"

params("htmlbody")="<body><html><p>Hello there</p>Best regards</body></html>"

params("charset")="UTF-8"

runner_mail(params)


More info on runner_mail function:
function runner_mail (params) - ASPRunnerPro wrapper for email function
params: Scripting.Dictionary object with input parameters.
The following parameters are supported:
from: Sender email address. If none specified an email address from the wizard will be used.
to: Receiver email address.
body: Plain text message body.
htmlbody: Html message body (do not use 'body' parameter in this case).
charset: Html message charset. If none specified the default website charset will be used.
Returns:
Scripting.Dictionary with the following data:
mailed: (True or False) indicates wheter mail sent or not
source: error source (Err.Source)
number: error number
description: error description
message: formatted message with all of above
Example with error handling:

set params = CreateObject("Scripting.Dictionary")

params("to")="test@test.com"

params("subject")="Sample subject"

params("body")="Hello there" & vbcrlf & "Best regards"

set result = runner_mail(params)

if not result("mailed") then

response.write result("message")

end if


Many thanks for this - now works.