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.
Problem
Joomla! 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 Solution
In 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., [email protected]). 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: Select all
if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )
Code: Select all
if ( JUtility::sendMail("[email protected]", "Email Name", $email, $subject, $body) !== true )
Secondly I edited the settings in the Joomla! administration area under Global Configuration->Server->Mail Settings as follows:
- Mailer: SMTP Server
Mail From: [email protected]
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 hope this helps somebody figure their issue out quickly because this was a journey I certainly wouldn't want to take again.
-Jason