Featured post
asp classic - Edit an email before sending -
my application uses following function send email.
function sendhtmlemail (strfrom, strto, strcc, strsubject, strbodyhtml)
' create newmail object
set objnewmail = server.createobject("cdonts.newmail")
' set sender , recipients (latter can ';' separated lists)
objnewmail.from = strfrom
objnewmail.to = "abc@xyz.com"
objnewmail.cc = "def@stu.com"
' set email subject
objnewmail.subject = strsubject
' construct , set email's body
strhtmlstart = "" & strsubject & ""
strhtmlend = ""
objnewmail.body = strhtmlstart & strbodyhtml & "
to : " & strto & "
cc :" & strcc & strhtmlend
' set parameters normal importance mime-encoded , html-formatted email
objnewmail.importance = 1 '9-low, 1-normal, 2-high
objnewmail.bodyformat = 0 '0-html, 1-text
objnewmail.mailformat = 0 '0-mime, 1-text
' send email now
objnewmail.send
' release newmail object
set objnewmail = nothing
end function
i not want email sent automatically. should open in outlook , allow me edit it.
can me change should put here in code email opens instead of being sent automatically ?
the data coming classic asp page , above function in utils.inc
you need understand processing mail in server , sending html client (the web browser).
there no possible way manipulate program (outlook) in client pc server, unless have piece of software (activex, add-on, etc.) in client computer.
that said, can trick
response.redirect("mailto:name@hotmail.com?subject=hello&body=place body here")
this open mail program configured in client (it depend on how client pc configured) aware limited on length of subject , body.
tested in firefox 3.6, chrome , internet explorer 8 (it raises security warning)
- Get link
- X
- Other Apps
Comments
Post a Comment