wwSMTP::cAlternateText

Allows you to specify an alterate message format. Commonly used to send a plain text message in addition to an HTML message for clients that don't support HTML.

Make sure to specify cAlternateContentType if using anything but text/plain.

Example

LOCAL loSMTP as wwSmtp
loSmtp=CREATEOBJECT("wwSmtp")
* loSmtp.nMailMode = 2  && wwIPStuff mode (Win32)   0 - .NET wwSmtp

loSmtp.cMailServer="mail.yourserver.net"
loSmtp.cSenderEmail="jimmy@hella2.com"
loSmtp.cSenderName="Jim Hella"

loSmtp.cRecipient="jimmy@hella.com"
loSmtp.cSubject="wwIPStuff Test Message"


*** Send desired content type first
loSmtp.cMessage="<b>This is the HTML text</b>"
loSmtp.cContentType = "text/html"

*** Send fallback content type second
loSmtp.cAlternateText = "This is the plain message text"
loSmtp.cAlternateContentType = "text/plain"


llResult = loSmtp.SendMail()      
IF !llResult
   Wait window loSmtp.cErrorMsg
ENDIF

See also:

Class wwSMTP

© West Wind Technologies, 2023 • Updated: 05/24/11
Comment or report problem with topic