I have been building a website hosted with GoDaddy and using Joomla! It was going great until I tried to send and article to my email using the email icon. It failed. I spent hours search Joomla! support, GoDaddy support. I placed 2 calls to GoDaddy's support and browsed dozens of other articles online trying to find the right mail settings. It's taken me a week to find the solution.
I was getting errors such as "PHPMAILER_FROM_FAILED", "Could not connect to SMTP host", etc.
I finally found a post by squishyalt here
http://forum.joomla.org/viewtopic.php?f=543&t=372702 that solved the first half of the issue. About halfway down he shows how to edit the controller.php of the mailto component. Then the second call to GoDaddy provided the correct Global Configuration->Server->Mail Settings.
Below I have detailed my solution.
ProblemJoomla! allows the user to present an email icon for articles and pages. Clicking the icon displays an “E-mail this link to a friend” dialog window. The user enters their “Email-To” email address, the “Sender” name, the sender’s email address, and the subject. After clicking send, Joomla! uses settings defined in the administration area under Global Configuration->Server->Mail Settings to send an email with the article link.
The issue presents itself after clicking “Send” because Joomla! attempts to use the sender’s email address as the “From” address on the email. GoDaddy will reject the send because the “From” address is not valid in the site’s hosting account. GoDaddy requires email messages sent using code through its servers to have a “From” address that is configured on the hosting account. This helps to prevent the sending of spam through GoDaddy’s servers.
The issue is further complicated because the settings defined in the administration area under Global Configuration->Server->Mail Settings have to be exactly correct. There is much conflicting information as to the exact settings to use here.
My SolutionIn order to work properly, I had to take following steps. I'm using Joomla! v1.5.
First I edited the document stored in “[Joomla! Install Directory]\components\com_mailto\controller.php”. Instead of using the users input email address as the “From” address of the email, I had to configure an address in the GoDaddy Email Control Center area. It has to be an email with a mailbox, not a forwarding address (eg.,
registeredEmail@godaddydomain.com). SMTP relays must be set to greater than 0 for this account. (250 is the current daily max. More can be purchased through GoDaddy.)
It is HIGHLY recommended to make a backup copy of the document before editing it.In the document, toward the bottom of the “function send()” is the following line:
Code:
if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )
“$from” is the address that the email is being sent from. “$sender” is the name associated with that address. I edited this line as such:
Code:
if ( JUtility::sendMail("registeredEmail@GodaddyDomainName.com", "Email Name", $email, $subject, $body) !== true )
If desired, the “$subject” or “$body” variables can be edited to include the address that the user put into the form. I put the users email into the subject as suggested by squishyalt in the article I mentioned above.
Secondly I edited the settings in the Joomla! administration area under Global Configuration->Server->Mail Settings as follows:
Mailer: SMTP Server
Mail From: registeredEmail@godaddydomain.com
From Name: Email Name
Sendmail Path: /usr/sbin/sendmail
SMTP Authentication: No
SMTP Security: None
SMTP Port: 25
SMTP Username: {Must Be Blank!}
SMTP Password: {Must Be Blank!}
SMTP Host: relay-hosting.secureserver.net
I don't know why the SMTP Username and Password have to be blank, but the send did not work until I cleared these fields.
I hope this helps somebody figure their issue out quickly because this was a journey I certainly wouldn't want to take again.
-Jason