{"id":4665,"date":"2014-06-20T13:07:34","date_gmt":"2014-06-20T20:07:34","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=4665"},"modified":"2014-08-28T04:19:41","modified_gmt":"2014-08-28T11:19:41","slug":"email-delivery-issues","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/email-delivery-issues\/","title":{"rendered":"Email Delivery Issues"},"content":{"rendered":"<p>If you use your Webhost Email SMTP server to send out emails but constantly end up with email delivery issues or AWeber subscription issues, this article is for you!<\/p>\n<p>A couple of small tweaks to your settings can improve email deliverability significantly.<\/p>\n<p>When you send an envelope in the postal mail, you specify a return address. This can be used by the postmaster to return the package back to you if the recipient does not exist or refuses your mail.\u00a0 A Postage Return Address is comparable to the SMTP Return-Path Header in an email.<\/p>\n<p>Every e-mail message has a hidden field called the &#8220;Return-Path&#8221; address (sometimes called a &#8220;bounce address&#8221; or &#8220;envelope sender address&#8221;). This should be the address a message really came from, and it&#8217;s the address to which any undeliverable message notices (&#8220;bounces&#8221;) are sent.<\/p>\n<p>The problem is on some Webhosts (like bluehost for example), the\u00a0envelope-sender address (return-path) is constructed using the web-hosting account username and hostname. It&#8217;s not a real email address.<\/p>\n<p>If you want to know what your webhost servers are sending in the email header, just update the DAP Products =&gt; Notifications =&gt; 3rd Party Notifications Ids to send an email to say your gmail address. Now if you add any new user to DAP, you will receive a &#8216;New User Signup&#8217; email notification in your gmail account. Check the email header of that received email. It will be something like this:<\/p>\n<p><a href=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/emailheader1.png\"><img loading=\"lazy\" class=\"alignleft  wp-image-4674\" src=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/emailheader1.png\" alt=\"emailheader\" width=\"462\" height=\"126\" \/><\/a><\/p>\n<p>As you can see above, the return-path is set to the webhost name (username@dreamhost.com) instead of the domain name.<\/p>\n<p>Most mail servers (like Aweber) attempt to confirm the return address provided is a real one for security reasons and if it&#8217;s not a real address, the email is considered forged and is rejected.<\/p>\n<p>But the good news is there is a way to force the SMTP servers to insert a valid and correct return path in the email header bypassing the default.<\/p>\n<p>Here are the steps:<\/p>\n<p><strong>1. Update dap-config.php file<\/strong><\/p>\n<p>Say that your website domain is example.com. And say that the Email Outgoing Server Name is mail.example.com.<\/p>\n<p>Then just ftp to your site and edit the \/dap\/dap-config.php file. Enter the following towards the top of dap-config.php file (after the php start tag):<\/p>\n<p>ini_set(&#8220;SMTP&#8221;, &#8220;mail.example.com&#8221;);<br \/>\nini_set(&#8220;sendmail_from&#8221;, &#8220;admin@example.com&#8221;);<\/p>\n<p><a href=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/dapconfigsetting.png\"><img loading=\"lazy\" class=\"alignleft  wp-image-4670\" src=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/dapconfigsetting.png\" alt=\"dapconfigsetting\" width=\"443\" height=\"117\" \/><\/a><\/p>\n<p>&#8211;\u00a0 If you are not sure what your SMTP server name is, you can check with your Webhost or you will find it in your Webhost CPanel -&gt; Email Account -&gt; Settings.<\/p>\n<p>&#8211;\u00a0 The sendmail_from should be set to an email address hosted on your domain and it should be a real email address. For ex &#8211; admin@example.com for example.com domain.<\/p>\n<p><strong>2. SMTP Auth<\/strong><\/p>\n<p>Configure DAP to use SMTP authentication to enforce the setting of authenticated and correct &#8220;Return-Path&#8221; in the headers.<\/p>\n<p><strong>Please NOTE :<\/strong><br \/>\nIf you use an external SMTP server like Amazon SES \/ Auth SMTP etc (configured in DAP Email -&gt; SMTP page.), you\u00a0 can skip this.<br \/>\nThe tweaks mentioned below is only applicable to the DAP owners who use their Local Web Host SMTP server for sending emails.<\/p>\n<p>It&#8217;s simple.\u00a0 In your Webhost CPanel -&gt; Email Account -&gt; select your email account that you will use to send emails (for ex &#8211; admin@example.com) and find the email account settings.<\/p>\n<p>You need to find the following info for your email account that&#8217;s hosted on your webhost. If you do not know how to find it, please contact your Webhost and they can help.<\/p>\n<table class=\"manual_settings_table\" style=\"height: 142px;\" width=\"376\">\n<tbody>\n<tr>\n<td>Username:<\/td>\n<td class=\"data\">admin@example.com<\/td>\n<\/tr>\n<tr>\n<td>Password:<\/td>\n<td class=\"escape-note\">Use the email account\u2019s password.<\/td>\n<\/tr>\n<tr>\n<td>Outgoing Server:<\/td>\n<td class=\"data\">SSLhost.example.com<\/p>\n<ul class=\"port_list\">\n<li>SMTP: Port 465<\/li>\n<\/ul>\n<p>NON-SSL<\/p>\n<p>mail.example.com<\/p>\n<ul class=\"port_list\">\n<li>SMTP: Port 26<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>Incoming Server:<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Now visit the DAP Admin -&gt; Email -&gt; SMTP Page and create a NEW SMTP server setting and activate it as shown below (click\u00a0 to see enlarged image):<\/p>\n<p><a href=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/smtpsettings.png\"><img loading=\"lazy\" class=\"alignleft  wp-image-4668\" src=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2014\/06\/smtpsettings.png\" alt=\"smtpsettings\" width=\"602\" height=\"130\" \/><\/a><\/p>\n<p>Remember to de-activate the default &#8216;Local Web Host&#8217; server so only the new SMTP server will be used to send out emails.<\/p>\n<p>This will enforce SMTP Authentication and setting of the right return path in the email header.<\/p>\n<p>That&#8217;s it.<strong><br \/>\n<\/strong><\/p>\n<p>These simple tweaks should help improve email deliverability.<\/p>\n<p>Please note that DAP is NOT an email server. While DAP can trigger the sending of email and the tweaks above will enable setting of right header parameters, it&#8217;s upto your webhost to actually deliver the emails.<\/p>\n<p><a href=\"http:\/\/digitalaccesspass.com\/doc\/troubleshooting-email-delivery\/\" target=\"_blank\">Read this article<\/a> for more on email issues.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use your Webhost Email SMTP server to send out emails but constantly end up with email delivery issues or AWeber subscription issues, this article is for you! A couple of small tweaks to your settings can improve email deliverability significantly. When you send an envelope in the postal mail, you specify a return [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/4665"}],"collection":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=4665"}],"version-history":[{"count":12,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/4665\/revisions"}],"predecessor-version":[{"id":4681,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/4665\/revisions\/4681"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=4665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=4665"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=4665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}