Post by Guessed » Tue Aug 30, 2011 2:07 am

2 weeks of searching Google and Yahoo for the correct Opencart mail config for GoDaddy's dreaded SHARED HOSTING, I figured out how to not only make it work, but fast. "work" and "fast" sound good, until I explain how I got it to work and what the "bug" is.

To protect the innocent, my domain name is mysterydomain.com. I created a mailbox for contact@mysterydomain.com at GoDaddy. In OC 1.5.1.1 I configured the Mail tab as follows:

Mail Protocol: SMTP
Mail Parameters: <..left blank..>
SMTP Host: smtpout.secureserver.net
SMTP Username: the_username
SMTP Password: the_password
SMTP Port: 80 (looks weird, but 25 and other ports would neither let my desktop Outlook connect, nor Opencart on GoDaddy's server connect - you get the fsockopen timeout error)
SMTP Timeout: 5

Ok, what I've done above is simply copy the GoDaddy SMTP settings that I use in my desktop Outlook client into Opencart. I figured if I can send and receive email in mere seconds to my mailbox at GoDaddy using Outlook, why the heck did mail delivery crawl when Opencart sent Contact Us forms to GoDaddy via the same account - of course selecting "Mail" instead of "SMTP" for the settings under Opencart's Mail tab.

So, with the configuration above, I can now send myself a test Contact Us form in record time using GoDaddy SMTP. After 2 weeks of starting out with the default "Mail" selected under the Opencart Mail tab, I too was convinced that GoDaddy provided pathetically slow mail deliver for its shared hosting customers. Actually, when I first tried using the above SMTP setup, it too provided slow delivery and I was at the end of my patience with GoDaddy and ready to relocate to a new hosting provider, rather than pay for premium hosting to get fast email delivery. And then, with the SMTP settings as above in Opencart, I stumbled across this mixed blessing in a last ditch effort: I filled out the Contact Us form using E-mail Address... drum roll... contact@mysterydomain.com!

Well, the Contact Us test email I sent popped immediately into my test email account, anyone@anydomain.com, which I specified on the Opencart General properties tab.

So, as long as every customer populates the Contact Us form with contact@mysterydomain.com as their E-mail Address I will receive their inquiry in a few seconds! Unfortunately, I won't know the customer's actual email address and, getting real now, I know nobody is going to fill out the form like that. Whoever wants to receive a reply will actually enter their own email address in the Contact Us E-Mail Address field - and this will cause the dreaded slow email deliver issue. You see, apparently, the Contact Us E-Mail Address is injected into the header as the "From" value - which is ok if it is contact@mysterydomain.com when connecting to contact@mysterydomain.com via SMTP, but not if “From” is any other email address. I am the opposite of a mail guru, but I sense that GoDaddy's SMTP server thinks I am a questionable source of email when I try to inject anything other than the SMTP's account own email address into the From field.

Is this a bug in the Opencart mail logic, or a misapplication of Opencart’s architecture? Should the E-Mail Address value in the Contact Us form get injected into the header, or into the body of the email received?

As a workaround, does it make sense for me to modify mail.php to (1) hard-code contact@mysterydomain.com to override the Contact Us E-Mail Address value someone enters into the form and then (2) take the email value the person enters and add it into the body text of the email?

Is my idea a bug workaround, or have I barked up the wrong tree and need serious email help, whether using GoDaddy's hosting or anybody else's, to get fast Contact Us emails, without paying for expensive hosting and email plans?

Thanks in advance for your help!
Last edited by Guessed on Tue Aug 30, 2011 10:13 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Aug 24, 2011 9:26 pm

Post by rph » Tue Aug 30, 2011 5:02 am

Guessed wrote:I sense that GoDaddy's SMTP server thinks I am a questionable source of email when I try to inject anything other than the SMTP's account own email address into the From field
Yes. Is there a reason you're not using the default Mail php function? There's a reason you're warned not to change it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Guessed » Tue Aug 30, 2011 5:25 am

When I used "Mail" instead of "SMTP", Contact Us form delivery times varied from 30 minutes to 3 hours. That is unacceptable for dealing with new potential customers and could lose existing customers who could demand a refund without timely email support. By using SMTP configured creatively, I get instant mail delivery.

Anyway, it looks like I solved my "bug" shortly after my first post. To be fair, I guess it wasn't a bug after all that I was dealing with. Instead, what I've actually done is overcome unfamiliar and unintuitive mail rules in order to integrate Opencart 1.5.1.1 with GoDaddy mail and get instant delivery times for the Contact Us form without having to upgrade from shared hosting to a more expensive hosting package with GoDaddy.

Instead of leaving it blank, I set the Mail tab Mail Parameters value to -fcontact@mysterydomain.com. Now I can send test Contact Forms with any email address, like any potential customer would, and I don't have to modify mail.php or inject a hidden hard-coded contact@mysterydomain.com to come from the Contact Us form.

I hope this helps anyone else who can’t get mail to work or can, but receives their Contact Us form emails way too slowly using GoDaddy's cheapest shared hosting plan. You can receive them fast if you (A) set up a mailbox at GoDaddy, then (B) on the Opencart Mail tab set the Mail Protocol option to "SMTP" rather than "Mail", and (C) set all your other settings, patterned after the general summary below:

Opencart 1.5.1.1 Mail Tab:

Mail Protocol: SMTP
Mail Parameters: -fcontact@mysterydomain.com
SMTP Host: smtpout.secureserver.net
SMTP Username: the_username
SMTP Password: the_password
SMTP Port: 80
SMTP Timeout: 5

Opencart 1.5.1.1 General Tab:

E-mail Address: anyone@anydomain.com, except contact@mysterydomain.com, or else your mail will be slow anyway

I REPEAT: make sure the Opencart 1.5.1.1 General Tab E-mail Address is not the same as the Opencart 1.5.1.1 Mail Tab: Mail Parameters email address, which is your GoDaddy mailbox. And don’t forget the –f in your Mail Parameters entry, which tells the GoDaddy SMTP server who the post is from and matches the GoDaddy mailbox email address.

Good luck!

Newbie

Posts

Joined
Wed Aug 24, 2011 9:26 pm

Post by Daniel » Thu Sep 01, 2011 3:40 pm


OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Guessed » Mon Sep 12, 2011 9:41 pm

Thanks for the info, Daniel, although the slow mail delivery appears to be due to GoDaddy's handling of shared SMTP, and I would think that anti-spam and anti-spoofing are legitimate reasons for this, aside from providing lowes priority SMTP handling for their cheapest hosting plans. However, without any OC code tweaks or workarounds, I was able to get consistently fast mail delivery with GoDaddy's shared hosting plan using the non-intuuitive configuration I described above.

Newbie

Posts

Joined
Wed Aug 24, 2011 9:26 pm

Post by voldra » Wed Oct 05, 2011 5:02 am

Hi,

i am using godaddy too, OC 5.1.3 installed, and follow your setting. i am getting this message

"Notice: Error: MAIL FROM not accepted from server! in /home/content/23/8296023/html/system/library/mail.php on line 298"

when trying to use the "Contact US"

Please advice.
Thanks

Newbie

Posts

Joined
Wed Oct 05, 2011 4:59 am

Post by myvision2024 » Mon Nov 14, 2011 6:02 pm

Folks

I recently installed OC on GoDaddy and faced various issues related to emails.I interacted with GoDaddy support team multiple time and could explain them the actual issue after few trials .Opposite to popular notions - GoDaddy team already have a solution for this .For this you need to configure SMTP server as " relay-hosting.secureserver.net" and not what you get from email settings . ALso you should set up an email with GoDaddy email service (for example contact@yourdomainname.com and embed that into send field of email.php).After this is done , could make email working .
Once you do this GoFDaddy server does an authentication before sending an email.You can send only 1000 emails per day through this channel which should be ok for startups but not sure how long .
One more point : If you still face any issue , please draft step by step emaiul and send to GD support team . I found them very responsive .
Email.Php (System/library/) should have line 101 as following

Code: Select all

$header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<contact@yourdomainname.com>' . $this->newline;
[img]
OCSettings.jpg

OCSettings.jpg (48.73 KiB) Viewed 23507 times

[/img]

Newbie

Posts

Joined
Fri Nov 11, 2011 11:34 pm

Post by myvision2024 » Mon Nov 14, 2011 6:04 pm

Folks

Forgot to mention one more point .After this configuration there is a delay in email deliveries.(up to 2 minutes).
Looks to me this is due to server authentication by GoDaddy server .

Best Regards

PM

Newbie

Posts

Joined
Fri Nov 11, 2011 11:34 pm

Post by badboybackagain » Fri Jan 20, 2012 11:29 pm

I am also using godaddy and OC 1.4.9.5 and I am not able to configure my mail options. My smtp server given by godaddy is smtpout.asia.secureserver.net. Please tell me what should i write in settings.

New member

Posts

Joined
Wed May 18, 2011 10:40 pm

Post by praveenpuglia » Fri Apr 27, 2012 7:31 pm

i have added a blog post here regarding gmail settings..a simple thing that many miss out! its here...
http://www.techindyeah.com/configuring- ... via-gmail/

Newbie

Posts

Joined
Fri Apr 27, 2012 7:27 pm

Post by Arif Shaik » Fri Aug 31, 2012 6:09 pm

Assalamualaikum Greetings to All OC users..
i am a newbie @ OC i am using v1.5.1x ;)

Fix that works :dance:
at the beginning i got bulk of errors in my log files about sending mails (contact mail, order mail, all cutomers) i had a long search on google as i am a googler i found the solution and it works for me!

Configured Settings >> Mail tab as:-
Mail Protocol: SMTP
Mail Parameters: (left blank)
SMTP Host: smtpout.secureserver.net (mine)
SMTP Username: get this from your web host
SMTP Password: get this from your web host
SMTP Port: 25 or 80
SMTP Timeout: 5

Thanks you Opencart
"Knowing is not doing Doing is Doing"

Newbie

Posts

Joined
Tue Jul 03, 2012 2:26 pm

Post by nagoyajin » Sun Oct 28, 2012 10:45 pm

I've been using 1.4.9.4 and I wish one of these solutions would work for me :-\
I tried adding the SSL part for google smtp and using port 465 - no love
I tried the settings in the post above - this is the same as what godaddy told me - it didn't work
I haven't tried the first solution due to some uncertainties - to refers to Email.php but I only have Mail.php. It says to put the code at line 101 - it's not clear whether it should be inserted or replace the block of code at that line.

I'm using the the smtpout.asia.secureserver.net (same as badboybackagain above) but no luck.

New member

Posts

Joined
Sun Oct 28, 2012 9:57 am

Post by Yixuan_lee » Thu Dec 13, 2012 11:28 pm

Thank you for the information. It helped a lot!

Guessed wrote:2 weeks of searching Google and Yahoo for the correct Opencart mail config for GoDaddy's dreaded SHARED HOSTING, I figured out how to not only make it work, but fast. "work" and "fast" sound good, until I explain how I got it to work and what the "bug" is.

To protect the innocent, my domain name is mysterydomain.com. I created a mailbox for contact@mysterydomain.com at GoDaddy. In OC 1.5.1.1 I configured the Mail tab as follows:

Mail Protocol: SMTP
Mail Parameters: <..left blank..>
SMTP Host: smtpout.secureserver.net
SMTP Username: the_username
SMTP Password: the_password
SMTP Port: 80 (looks weird, but 25 and other ports would neither let my desktop Outlook connect, nor Opencart on GoDaddy's server connect - you get the fsockopen timeout error)
SMTP Timeout: 5

Ok, what I've done above is simply copy the GoDaddy SMTP settings that I use in my desktop Outlook client into Opencart. I figured if I can send and receive email in mere seconds to my mailbox at GoDaddy using Outlook, why the heck did mail delivery crawl when Opencart sent Contact Us forms to GoDaddy via the same account - of course selecting "Mail" instead of "SMTP" for the settings under Opencart's Mail tab.

So, with the configuration above, I can now send myself a test Contact Us form in record time using GoDaddy SMTP. After 2 weeks of starting out with the default "Mail" selected under the Opencart Mail tab, I too was convinced that GoDaddy provided pathetically slow mail deliver for its shared hosting customers. Actually, when I first tried using the above SMTP setup, it too provided slow delivery and I was at the end of my patience with GoDaddy and ready to relocate to a new hosting provider, rather than pay for premium hosting to get fast email delivery. And then, with the SMTP settings as above in Opencart, I stumbled across this mixed blessing in a last ditch effort: I filled out the Contact Us form using E-mail Address... drum roll... contact@mysterydomain.com!

Well, the Contact Us test email I sent popped immediately into my test email account, anyone@anydomain.com, which I specified on the Opencart General properties tab.

So, as long as every customer populates the Contact Us form with contact@mysterydomain.com as their E-mail Address I will receive their inquiry in a few seconds! Unfortunately, I won't know the customer's actual email address and, getting real now, I know nobody is going to fill out the form like that. Whoever wants to receive a reply will actually enter their own email address in the Contact Us E-Mail Address field - and this will cause the dreaded slow email deliver issue. You see, apparently, the Contact Us E-Mail Address is injected into the header as the "From" value - which is ok if it is contact@mysterydomain.com when connecting to contact@mysterydomain.com via SMTP, but not if “From” is any other email address. I am the opposite of a mail guru, but I sense that GoDaddy's SMTP server thinks I am a questionable source of email when I try to inject anything other than the SMTP's account own email address into the From field.

Is this a bug in the Opencart mail logic, or a misapplication of Opencart’s architecture? Should the E-Mail Address value in the Contact Us form get injected into the header, or into the body of the email received?

As a workaround, does it make sense for me to modify mail.php to (1) hard-code contact@mysterydomain.com to override the Contact Us E-Mail Address value someone enters into the form and then (2) take the email value the person enters and add it into the body text of the email?

Is my idea a bug workaround, or have I barked up the wrong tree and need serious email help, whether using GoDaddy's hosting or anybody else's, to get fast Contact Us emails, without paying for expensive hosting and email plans?

Thanks in advance for your help!

Newbie

Posts

Joined
Sat Dec 08, 2012 6:16 pm

Post by Xonnie316 » Fri Dec 14, 2012 7:00 am

Hi all,

I'm a GoDaddy user and I've been having lots of trouble getting the Mail to work within my OpenCart.

I've tried so many types of combinations I've lost hope and the mail still won't work.

I've tried using Mail & SMTP
Mail Parameters: -fsales@domainaddress.com.au
SMTP Host: smtp.asia.secureserver.net (found this out since I'm using an australian domain via http://www.dnsqueries.com/en/mx-lookup.php)
SMTP Username: sales@domainaddress.com.au
SMTP Password: ********
SMTP Port: 80 (I've even tried 25)
SMTP Timeout: 5

I've had no success and I haven't received any emails.

Would there anybody that would suggest me anything ?

User avatar
New member

Posts

Joined
Fri Mar 16, 2012 7:19 am
Location - Melbourne, Australia

Post by awetro » Sat Apr 06, 2013 1:56 pm

Mail Protocol: SMTP
Mail Parameters: <..left blank..>
SMTP Host: smtpout.secureserver.net
SMTP Username: godadddy mail account_username
SMTP Password: godadddy mail account_password
SMTP Port: 80 (looks weird, but 25 or secure port 465 would not let Opencart on GoDaddy's server connect - only blank page)
SMTP Timeout: 5
Hi,

I have some Urgent Questions.

I have my web site hosted on godaddy with ssl and with above settings it works but the problem is I cant use secure port 465 here. Is port 80 secure here? or what should be done to use the port 465.

Thanks.

Newbie

Posts

Joined
Sat Apr 06, 2013 1:45 pm

Post by mahek » Tue Jun 24, 2014 11:54 pm

Hello,
When customers create account in my opencart store there is an big error

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/learning/public_html/mysite.com/system/library/mail.php on line 153Warning: fsockopen(): unable to connect to mysite.com@gmail.com:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/learning/public_html/mysite.com/system/library/mail.php on line 153Notice: Error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) in /home/learning/public_html/mysite.com/system/library/mail.php on line 156

anybody can help me please?
Thank you advance

Newbie

Posts

Joined
Tue Jun 24, 2014 11:50 pm
Who is online

Users browsing this forum: No registered users and 86 guests