Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ASPMail - problems with form mailer and hotmail addresses

Posted on 2005-03-30
Medium Priority
Last Modified: 2008-01-09
I have created a simple "send this to a friend" form but it seems to have problems when Hotmail addresses are used:


which submits to a page with the following code:

Set Mail = Server.CreateObject("SMTPsvg.Mailer")    
Mail.FromName   = Request.Form("name")
Mail.FromAddress= Request.Form("youremail")
Mail.RemoteHost = "mail.mailserver.com"        
Mail.AddRecipient  "", Request.Form("friendemail")
Mail.Subject    = Request.Form("subject")
Mail.BodyText   = Request.Form("message")

I have several email accounts on this server and testing any combination of these as sender/recipient works fine.

At first I had no subject/message fields for testing and using a hotmail address as recipient did not work, the email didnt ever arrive. By adding a subject and message body they now do arrive at a hotmail recipient (using one of my "proper" email addresses as sender)

But, the message is always put into junk, which isnt great. Any idea on how to prevent this from happening would be good.

Also, using a hotmail address as sender and another hotmail as receipient, the email never arrives.

But, using a "proper" email address as recipient, and hotmail as sender, the email DOES arrive!

Not sure whats going on, just need help/ideas to troubleshoot/explain this.


Question by:gump2k
  • 3
  • 2
  • 2
  • +1

Expert Comment

ID: 13661038
yeah, it looks like they deined people sending emails to known spam mail servers.
to solve this I think you need to log into their SMTP server using your POP3 credentials.

hope that helps


Author Comment

ID: 13661315
can u explain a bit more about what u mean?

who should i log into, and how will that help the form go through (which will be used by people everywhere)


Expert Comment

ID: 13664046
There are three possible problems:
1) Like Dr. Binks said your mail server may be rejecting emails sent from a known spam domain (ie @hotmail.com). The mail server is not an open relay for certain domains.

2) The mail is being filtered out because the domain name of the email does not match the domain from which you are sending.

3) ASPMail is having some sort of issue. Try adding the following code to make sure no errors are occuring on that end:
if not Mailer.SendMail then
  if Mail.Response <> ''" then
    strError = Mail.Response
    strError = "Unknown"
  end if
  Response.Write "Mail failure occured. Reason: " & strError
end if

Unfortunately ASPMail does not support user authentication so you may have to look into getting a different mailer object. I use ASP Email and love it. (http://www.aspemail.com/) and it does support SMTP authentication.
For potential solutions to the first 2 issues (using ASPMail) look at the following page:
in particular this looks like what you need:
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. I

f 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 SMTP server is not relaying mail for the recipient domain.

The SMTPLog feature allows you to verify if the transactions are complete and valid before pursuing other avenues in determining the cause of failure. If you see no errors in the SMTPLog then you need to check downstream of AspMail starting with the SMTP server you are using to send, as well as the recipient SMTP server. Anti-spam features on either machine may be identifying your message as spam and may need to be reconfigured. Check with the SMTP server administrators.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

ID: 13665828
1) I dont think it is rejecting emails sent from a certain domain, as I AM able to send FROM a hotmail address, just not to a second hotmail address

2) see point 1, also I have tried many combinations of sender address which work

3) I have got those lines of code for error checking, and it gives no errors, it all works fine apart from this issue when going from hotmail to hotmail


Accepted Solution

T-Dub earned 600 total points
ID: 13666780
The sending issue is about the FROM address, not the too address. Your mail server may be rejecting all emails that come FROM certain domains by open relay.

Author Comment

ID: 13669241
Once again, I AM ABLE to send FROM hotmail.

Here are the full set of results:


FROM [an email address hosted on the script's  server] TO [hotmail] - WORKS (although it ends up in hotmails trash)

FROM [an email address hosted on the script's  server] TO [an email address hosted on the script's  server] - WORKS

FROM [hotmail] TO [an email address hosted on the script's server] - WORKS

FROM [hotmail] TO [hotmail] - THIS DOES NOT WORK

Hopefully this is a bit clearer now. Thanks
LVL 22

Expert Comment

ID: 14876541
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I appreciate any comments that would help me to make a recommendation.

Unless it is clear to me that the question has been answered I will recommend delete without refund of points.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade.  It is assumed that any participant not responding to this request is no longer interested in its final disposition.

If the user does not know how to close the question, the options are here:

EE Cleanup Volunteer
LVL 22

Expert Comment

ID: 14930633
I am leaving the following recommendation for this question in the Cleanup topic area:
Accept: T-Dub

Any objections should be posted here in the next 4 days.  After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question