Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"emailing" ContentType="text/html" does not work in for MAC

Status
Not open for further replies.

gavray

Programmer
Jul 17, 2000
65
GB
Hi,

I'm using SASMTP from softartisans,

when sending the email message body as HTML and an attachment it works fine, when the receiver of the email uses a PC.

BUT with MAC users they receive html tags instead of text/html format.

Can anyone please help this is the code:


Set Mailer = Server.CreateObject("SoftArtisans.SMTPMail")

'--- Get and print the internal version number
Dim strVer
strVer = Mailer.Version
'Response.Write "SA-SMTPMAIL Version: " + strVer

'--- Set Properties for The name of the sender (FromName) and their email address (FromAddress)
Mailer.FromName = "gav"
Mailer.FromAddress = "gavin@kool.com"

'--- Add the recipient who will receive the email.

mailer.addrecipient firstname, myAddressString

'--- Add carbon copy to another recipent if needed
'mailer.addcc "my recipient 2", "destination2@unknown.com"

'--- Body of text
Mailer.bodytext = myString

'--- This sets the character set.
'--- 1 = US ASCII , 2 = ISO-9959-1
mailer.charset = 1

'--- This works if the recipient's e-mail program 'supports confirmation.
'mailer.confirmread = true

'--- You set the ContentType header of a message'sBodyText.
mailer.ContentType = "text/html"

'--- Set if you use a character set other than the types you can set.
'mailer.customcharset = "big5"

'--- Used to override the default date/time header
'mailer.datetime = "Fri, 02 May 1997 10:53:49 -0500"

'--- Sets encoding type for any attachments.
'--- Value can be 1 for UUEncoded (Default) or 2 for MIME.
mailer.encoding = 2

'--- Sets the Organization header.
mailer.organization = "SA SMTP Org"

'--- Recipient's SMTP server sends a notice confirming that the e-mail has been delivered.
'--- Only if users server supports notifcation.
'mailer.returnreceipt = true

'--- Sets Subject line for the message
mailer.subject = "Job Application"

'--- The Encodeheader method encodes a string in RFC1522 format to provide support for 8-bit mail headers.
'mailer.subject = mailer.Encodeheader("££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££")

'--- Used for Logging Debugging log
mailer.smtplog = "c:\mysmtplog.txt"

'--- This property works in conjunction with the SMTPLog property to
'--- indicate whether the log file receives a copy of the message text
'mailer.suppressmsgbody = false

'--- This property indicates whether the message will word wrap.
'mailer.wordwrap = true

'--- This property sets the position at which the message body wraps
'--- if the WordWrap property is set
'mailer.wordwraplen = 50

'--- This property indicates the maximum amount of time, in seconds,
'--- that SA-SmtpMail waits for a response from the remote SMTP server
'mailer.timeout = 120

'--- This method adds extra X-Headers to the message's mail envelope
'mailer.addextraheader "x-mycompany: specialinstruction"

'--- This method adds attachments to current message.
mailer.addattachment "e:\data\info\prof\" & CV & ""
'mailer.addattachment "c:\ntdetect.com"
'mailer.addattachment "c:\boot.ini"

'--- This property lets you test that SA-SmtpMail works, without
'--- actually having an SMTP server.
'mailer.live = false

'------------------------------------
'--- Set the Remote Host (SMTP) Host that we'll send this mail thru.
'--- We set a condition to verify that Remote Host is correct.
'------------------------------------
'strMailHost = "server.xft.com"
strMailHost = "mail.diexnet.com"
if strMailHost = "" then
Response.Write &quot;<h2 align=center>Error: You need to change the mailhost to your SMTP server address</h2>&quot;
else
Mailer.RemoteHost = strMailHost
end if

'------------------------------------
'--- Set priority and if message is urgent. Prioritys are 1, 3, 5 and
'--- are reflected in the X-Priority header
'--- 1 = High, 3 = Normal, 5 = Low
'------------------------------------
Mailer.Priority = 1

'---This property sets a flag in the outgoing message that indicates
'---the message is urgent
Mailer.Urgent = true

'--- Sends the message and can be used to verify if there if it has been sent.
if Mailer.SendMail then
Response.Write &quot;<p><font face=verdana color=green><f2>Mail sent...&quot;
else
Response.Write &quot;<p>Mail failure. Check mail host server name and tcp/ip connection...&quot;
end if

'--- This method returns the path for temporary mail files set by the operating system
'response.write &quot;<BR> &quot; & mailer.gettemppath

'--- This property returns any errors.
'response.write &quot;<br> &quot; & mailer.response

set Mailer = nothing

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top