Link to home
Start Free TrialLog in
Avatar of Overthere
Overthere

asked on

Email Sending Issues

I have an internet application that requires my users send invoices to their clients.  We use MailEnable and send the invoices TO the client email FROM our user's email address using our IP.  Lately there has been lots of delivery failures due to "policy reasons" or DMARC issues.  

This makes sense that most of the public addresses (Yahoo, AOL, Gmail, etc.) have restrictions in place to safeguard against spoofing, however this is now causing us major headaches and our users are getting frustrated because their emails not getting delivered.

I have tried explaining the WHY they are not delivered and that the sending domain's IP doesn't match the From address domain IP, but it goes right over my user's heads and they keep blaming our app for the error.

What solutions are available for me to get my users' invoices out to their clients through my application?  It's a classic .asp application residing on a MS Windows 2008 R2 Standard server.

TIA - Any and All suggestions welcome!
Avatar of Big Monty
Big Monty
Flag of United States of America image

if you want to get away from MailEnable and send directly from your asp application, you can you use CDO

http://www.w3schools.com/asp/asp_send_email.asp

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>

Open in new window

Use a 3rd party smtp service like http://mandrill.com/ or http://sendgrid.com/

You can use your own server via cdo http://www.paulsadowski.com/wsh/cdo.htm
Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "Example CDO Message" 
objMessage.From = "me@my.com" 
objMessage.To = "test@somebody.com" 
objMessage.TextBody = "This is some sample message text." 
objMessage.Send

Open in new window

There are other options you may need such as authentication etc and the samples are on that page.

However, your deliverability will be best using mandrill or sendgrid.  You can still send out  via cdo, you just change the smtp server
Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "Example CDO Message" 
objMessage.From = "me@my.com" 
objMessage.To = "test@paulsadowski.com" 
objMessage.TextBody = "This is some sample message text."

'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.myserver.com"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 

objMessage.Configuration.Fields.Update

Open in new window

Or you can use their api to send mail.

Mandrill allows the first 11,000 emails for free but you are on a shared IP.  Your own IP is $30 per month.  I would not advise using sendgrid's service below the Silver package. The reason is they don't white list the $10 package for aol or comcast.
Oh, you are going to need the authentication method if you send from your server.  Use your own domain, username and pass for authentication and this will allow you to send "from" any domain.  This is another thing 3rd party smtp servers are good for.  Plus they show stats like opens and managing bounces are via the api.

Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory. 
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network). 

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "Example CDO Message" 
objMessage.From = """Me"" <me@my.com>" 
objMessage.To = "test@paulsadowski.com" 
objMessage.TextBody = "This is some sample message text.." & vbCRLF & "It was sent using SMTP authentication."

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.your.com"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "youruserid"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update

Open in new window

Experts, note that the problem is not about Sending email but about Delivering the email.

The only solution is to send FROM your own email address for them.  As long as you try to send FROM an address that is not on your hosting, you will have this problem.
Avatar of tmoore1962
tmoore1962

You need to have your app use the customer's email server to send the invoice so you'd set up your mail server to send customera.com emails to their mail server and their mail server and firewall need to be configured to accept emails from your email server, much in the same way you configure exchange to accept mail from a printer then relay it on, just make sure you do it for specific IP and securely .  Then the reverse look and spf checks won't flag the invoices.
Avatar of Overthere

ASKER

All some great ideas, but I think Dave hit the nail on the head when he mentions that my issue is that I send FROM their email address using our IP - so the delivery is the problem.

Let me ask this - trying to get around this issue.  What if I had setup an email address on MY server for each of my clients.  I wouldn't want them to actually use that email but have it as a "forwarding" address only.  I would have the emails forwarded to them when their clients email back.  But at least when I sent the emails, that domain would be one registered to my IP address.

The only issue with this is that some of my users refuse to budge from their "public" email addresses that they have used for years.

My problem with my users is that they are extremely varied - AOL, Yahoo, Gmail, and such a wide variety - that finding a solution best to be one-size-fits-all...
If you authenticate, you should be able to send "from" any address you want.  You would authenticate all the email through your smtp server with your username and password.

However, there are risks sending out email through your own server.  Many people do it because of the cost (no added cost).  But, the reason to use a 3rd party smtp service like mandrill or sendgrid is to separate your actual business mail from what could be spam (even when you think it is not).  There is also some white listing going on with 3rd party services.  Getting past AOL or Comcast is not easy.  The incoming mail servers detect the mail was automated and those 2 ISP are among the hardest to get past.  

You can read more on whitelisting at each specific ISP such as http://postmaster.aol.com/Postmaster.Whitelist.php or http://constantguard.comcast.net/dedicated-support/contacts

The 3rd party services already have relationships and that is part of what you are paying for.   If you go at this on your own, you have to keep up. Last time  I did this I think it was about a month for AOL.
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree on the solution where I host the address... what about setting up a "forwarding" email address for them that goes to their public address?  Does that sound like a solution?  Their clients would still have to add this new address to their address book so it doesn't go into their junk folders I suppose...
Maybe.  Many people will simply reply to the sending address and then you will have to forward that.  Or put a 'mailto' link in the email that goes to your client's public address.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial