| How do I determine a cause of
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.
|
| Checking the Mailer.Response
property returns
"File Access Denied"
or
"Cannot create file"
or
"I have a TMP/TEMP var but it still
isn't working"
What's wrong?
|
You probably don't have a TMP
or TEMP path set up, or if you do, the IIS User (or any users
authenticating under IIS) don't have read/write access to the this
directory.
- Make sure the directory exists.
- Make sure the TMP or TEMP variable exists in your NT/Win95
environment. Under NT this must be a system environment
variable, not a user environment variable. If TShoot (see our tech
support page) doesn't show the var it isn't a system var. It must
be a system var.
- Make sure all users which need access to the component (the
anonymous IIS user and any other users which authenticate under IIS)
have read/write access to this path.
How to determine where your TMP/TEMP dir points
to
AspMail versions 2.5.8 and higher have a method called GetTempPath.
To display where your TMP path is set to place the following code in
an ASP script and run it.
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Response.Write Mailer.GetTempPath
Your Win32 OS is designed to find your temporary path in the following
manner:
- Check for TMP.
- If it does not exist, check for TEMP.
- If it does not exist use the current directory. ASP tends to use
the \WinNT directory in this case.
|
| What would cause an
"Operation timed out error"?
or
"AspMail has been working great but
suddenly I'm getting an 'Operation timed out' error.
|
Reasons for operation timed
out include:
- SMTP server is down, overloaded or simply not responding
- Firewall blocking port 25 between AspMail and SMTP server
- Packet filtering blocking port 25 between AspMail and SMTP server
- IP route is down
- Your Winsock configured DNS server is down
To check using another method run
telnet [smtp hostname] 25
from the IIS server where AspMail is installed. If telnet can see the
SMTP server, then AspMail can see the server also.
|
| I'm adding attachments but
they aren't getting 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.
- The file is open by another process that's denying reads to the
file.
|
| Is there a comprehensive list
of errors that can be returned by AspMail? |
There are quite a few errors
that can be returned. We do not have a comprehensive list, primarily
because these errors are returned from systems AspMail is dependent on.
The errors can come from your SMTP server (errors vary from vendor to
vendor), from WinSock errors (documented by Microsoft®)
and general OS errors such as out of memory, disk read/write failures
etc... (again documented by Microsoft®). |
| "AddCC or AddBCC doesn't
work" - is this a bug with AspMail?
or
"I'm 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).
|
| The syntax
Mailer.AddRecipient = "name",
"name@address.net"
and
Mailer.AddRecipient = "name@address.net"
both return a VBScript error. What's
wrong?
|
First off, remove the = sign.
AddRecipient sounds like and is actually a method, not a property. Also
AddRecipient takes two parameters. See AddRecipient in the
methods listing for details. |
| What's the syntax for adding
multiple recipients? |
Call AddRecipient, AddCC or
AddBCC for each recipient. There's no other way to add multiple
recipients.
Mailer.AddRecipient "name1",
"address1"
Mailer.AddRecipient "name2", "address2"
Mailer.AddBCC "name3", "address3"
|
| How do I define the
sensitivity of the message? |
Outlook allows you to define
a message sensitivity. You can do this using as mail by adding the
sensitivity header along with the proper text for the sensitivity
header.
For example:
Mailer.AddExtraHeader "Sensitivity:
Company-Confidential"
|
| How do I create a hyperlink
in my message? |
Set Mailer.ContentType =
"text/html" and include the hyperlink just like you would with
html.
<html>
<head><title>AspMail HyperLink</title><head>
<body>
<H3>AspMail HyperLink</H3>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Status Update Report"
Mailer.FromAddress = "useyour@isphostnamehere.com"
Mailer.RemoteHost = "Put IP address of your WEB server here"
Mailer.AddRecipient "Your Recipient", "yourrecipients@addressgoeshere.com"
Mailer.Subject = "AspMail Hyperlink"
Mailer.ContentType = "text/html"
Mailer.BodyText = "<html><body>Here's some <a
href=""http://www.serverobjects.com/"">info</a></body></html>"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail failure. Check mail host server name
and tcp/ip connection..."
Response.Write "<p>" & Mailer.Response
end if
%>
|
| 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.
|
| I want to create a mail
service like HotMail or Yahoo Mail. Do you have script code that would
serve as a basis for this? |
No. We only provide the
AspMail and AspPOP3 components. You will have to either write the code
yourself or find a consultant to do it for you. |
| I want to use AspMail from
VB, FoxPro or [insert name here]. |
Be sure you are using
AspMail 3.x since this version corrects a problem some users reported
with previous versions.
|
| 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 listing 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 email I send." |
Yes, the text will be
appended to the message. Use ClearBodyText if you need to clear the
message text. |
| 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. |
| How do I get Exchange to
route Internet email to the Net? |
Exchange uses a service
called the Internet Mail Connector (IMC) to allow it to act as an SMTP
server and transmit and receive mail via a TCP/IP network. If you are
not running the IMC you will not be able to send or receive mail from
the Internet by AspMail or any other means.
Once you have SMTP mail going with the
IMC, no further action should be necessary to use AspMail. (Thanks to
Steve Crane for this information).
Note: You must enable the rerouting on
your Exchange's Internet Mail Connector. Go in the properties of your
Internet Mail Services (Exchange 5.0). Check the reroute incoming SMTP
mail option and add a route to your domain. Mail sent to "yourdomain.com"
should be accepted as "inbound". Thanks to Sébastien Stormacq
for this information.
|
| 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. |
| What does error "554 No
valid recipients" mean?
or
"503 Need RCPT (recipient)"
|
500 series errors are errors
that the SMTP server generates. This error means that the message
recipients given are either not given (you didn't use AddRecipient,
AddCC or AddBCC) OR they are not valid recipients for this SMTP server.
This is often associated with the "no relay" issued covered
above. The SMTP server rejects the given recipients and then issues this
error. This typically happens when you have IgnoreInvalidRecipients set
to true. You can verify that the SMTP server is ignoring your recipients
due to the "no relay" issue or for any other reason by using
the SMTPLog property to generate a log and then look at the rejection
errors in the log file. |
Some of our emails 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.
|
| Sometimes I get multiple
messages sent when I call SendMail. Why? |
AspMail has an internal
routine to look for errors. If an error occurs at any point (even after
the text of the message has been sent to the SMTP server) AspMail will
go ahead and attempt to send it a second time in an attempt to complete
the SMTP transaction without any errors if, and only if, you have
multiple RemoteHosts set up in the RemoteHost property. The AspMail
routine will only attempt 1 retry in this case.
If you only have one host name setup then
the problem will be found in #1) your calling SendMail more than once or
#2) you are not handling cases where the user does a double-click on
his/her browser.
|
| With AspMail can I have
"required fields" on my HTML forms or other form processing
functionality. Can AspMail change the order I get form field data back? |
- Microsoft's ASP, not AspMail controls form data order. If you are
looping through the form data in ASP order it probably won't be the
original form order. You'll have to hard code field names to force
the data back in a specific or original form order.
- Required fields are a function of HTML and client side scripting,
not AspMail. If you used a CGI library in the past that handled
those issues for you, it what only because they delved into areas
outside of SMTP/Mail. AspMail's only function in life is to send
mail. It does not handle client side HTML/scripting.
|
| "Can someone use AspMail
to send SPAM through our system?" |
AspMail does not accept SMTP
connections and therefore cannot be used to relay SMTP traffic. AspMail
can generate new SMTP message traffic but only if you provide a script
page to generate it. Therefore it is under the Web operator's control. |
| WebTrends is generating
multiple messages when its schedule runs. |
WebTrends is probably parsing
your Web tree and calling the HTML and ASP scripts to determine what
they are. In the process the ASP scripts you have that call AspMail may
be getting called at the same time. Your options are:
- You are going to have to configure WebTrends not to call these
scripts. - or -
- Modify your scripts so that if WebTrends is calling them they
don't fire off a message. - or -
- Contact WebTrends for another solution. AspMail can't control
WebTrends.
|
| I'm mailing a large number of
people. At some point in the mailing it fails. Can you give me any tips? |
The first tip is to use the
SMTPLog property to write an SMTP log to disk and see what the point of
failure is based on the log. The SMTP server is probably rejecting your
message for some reason and the cause is typically determinable from the
log.
Secondly, some SMTP servers only accept
mail for locally known recipients. The SMTP server may be rejecting your
message since it is being addressed to recipients outside the domain of
that SMTP server. This is unusual but could possibly be the problem you
are running into.
|
| What are some of the issues
that affect the speed of the mailing? |
A small message should take
3-4 seconds to send if the server is local and all other conditions are
normal. The following list are some items that can affect transfer
speed.
- The slower the TCP connection the longer the mailing will take.
Typically a local server is much faster than a remote server. If you
are losing packets between your server and the SMTP server you can
expect longer times due to this packet loss.
- The size of the mailing. The larger the message the longer the
message transfer will take to send.
- CPU utilization: If your CPU is experiencing heavy usage you can
expect it to take longer to transfer mail.
- SMTP server utilization: If your SMTP server is experiencing heavy
traffic response times from the server are going to take longer thus
increasing the time it takes to send a message.
One thing we've found is that by changing the RemoteHost name from
a hostname to an IP address can cut 3 or 4 seconds off some messages.
Even if the RemoteHost name is set to the local server's name, we've
found some messages waiting for the hostname lookup. Just change the
address to an IP and you may see an increase in the speed.
|
| Is there a limit to the
length of email addresses. |
AspMail support longer email
addresses than anyone has so there are no practical limits. If your
email is not being delivered see the previous questions for pointers on
how to troubleshoot mail failures. |