How do I determine the cause of a mail failure?

Note about FromAddress: You must specify a value for the FromAddress property. Mail failure will
occur without a FromAddress.

If the component can determine why the SendMail method failed, that information will be stored
in the Response property. So, for example, to print that information to the clients browser you
could add the following code:

if not Mailer.SendMail then
if Mailer.Response <> ''" then
strError = Mailer.Response
else
strError = "Unknown"
end if
Response.Write "Mail failure occured. Reason: " & strError
end if

Another fairly common problem is when a user reports that a specific feature is not working.
For example BCC's may seem to never reach their destination. A valuable debugging tool is available
with the SMTPLog feature. Assign a valid filename to this property and the contents of the SMTP
transaction that occurs during a SendMail call will be recorded to this file. If you find that
the SMTP transaction occurs without error then you should check elsewhere for the cause of mail
delivery failure. Invariably the user finds that the BCC address was invalid or that the address
was misconfigured. The SMTPLog feature allows you to verify if the transactions are complete and
valid before pursuing other avenues in determining the cause of failure.

I'm adding attachments but they aren't being added to the actual mailing.
What's wrong?

The path specified is not valid.

The user the component is running under, typically the anonymous IIS user, does not have rights
to open the file. The anon IIS user, by default, cannot read from networked drives so a path
such as \\foobar\files\myfile.zip is not valid.

"AddCC or AddBCC doesn't work" - is this a bug with
'ASPMail'? or "I adding multiple recipients but only the first one is getting delivered.
What's wrong with ASPMail?"

AddRecipient, AddCC and AddBCC work just as they should. The problem is not with ASPMail. It
is likely that your SMTP server is rejecting "foreign addresses" (see "no relay"
question below).

To test whether ASPMail is functioning properly use the SMTPLog property to capture an SMTP session
with multiple recipients. All the recipients you send to should appear in the log as the SMTP
envelope is sent. If they all appear then the problem is with your SMTP server or an SMTP server
down the stream (or your addresses are invalid).

How do I create a line-break in a message?

Under VBScript you can use the predefined constant VbCrLf. Simply using a Chr(13) or a Chr(10)
will not work --you must use both -- the VBCrLf defined constant is the preferred method. A Carriage-return
and line-feed character are required to create a new line in the message. See the sample scripts
for examples.

My mail to AOL is bouncing. What am I doing wrong?

AOL will not accept anything other than a true address in the "From:" heading. Just
about every mail system out there, except AOL and Compuserve, will accept the "No Mail Address"
as the "From:" header. (thanks to R.S for this info).

Does ASPMail support 8bit messages? or "does ASPMail support
Japanese character set"

ASPMail supports any 8 bit characters but please note:

Message bodies may be 8bit.

Some SMTP servers drop the 8th bit in message headers including Subject lines.

You can encode message subjects using a new method named EncodeHeader. See the methods
page for details. Some character sets don't work properly using this method, some do. We don't
have any support for character sets that don't work properly using this encoding.

Can I repeatedly assign values to the BodyText property? and
"The message text keeps growing with each e-mail I send."

Can ASPMail be used to retrieve files off the client computer?

ASPMail is a server-side component. Retrieving files from the client computer requires a client-side
component that has access to the client's local harddisk or a browser that supports file uploads
in addition to a server side component/extension that can accept those files. ASPMail does not
support this function.

The SMTP server is reporting back a "no relay" error. What's
wrong?

The SMTP server is looking at your FromAddress and determining that it doesn't know who you are.
Some SMTP servers are configured to disallow the "relaying" or transfer of mail originating
from addresses outside of its own domain. The only solution is to provide a FromAddress that's
local to the SMTP server's domain or get the operator of the SMTP server to allow the FromAddress
you are using. This setting is commonly used by ISP's to prevent spammers from using their resources.

Some of our e-mails are getting equal signs at the end of lines in
some messages. Why?

ASPMail can encode high characters using a scheme where the = sign
indicates a character to be decoded follow by the hex string value of
the character to be encoded. This system of course assumes that the client can decode these characters
(which most can). This is called quoted-printable encoding. The default for ASPMail is not to
use QP encoding. Things that trigger automatic QP encoding:

High characters - characters with the following ordinal values 0..31,61,128..255

Long lines of a message body (you can turn wordwrap on to fix this case)

Most clients are capable of handling QP encoding. If your client is not capable then you should
upgrade your client or you must work within the above limitations to prevent the QP encoding from
occuring.

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!