|
Written by bradley smith
|
|
Sunday, 18 January 2009 10:58 |
|
You need to make some arrangements on your code and on your server settings to get your site handle email operations if your Joomla site is on yahoo small business servers. or else Default configuration of Joomla doesnt allow to send emails on yahoo servers. This is a common problem and i checked out all the forum for a few days and couldnt find out a solution so i spent the whole night to do the job myself with my beginner level php and joomla experience and i succeed to make joomla send email on yahoo servers finally so i want to share the solution of myself worked for my own website on yahoo servers.
This solution basically covers 2 main problems:
- Problem 1: When users try to send email to friends by clicking on the "send email to friend" link on top of the articles they get an "EMAIL_NOT_SENT" error message and email could not be sent.
- Problem 2: When users try to send an email through the "contact us" page on your site they recieve an error "Could not instantiate mail function" and email could not be sent successfully. But if you also click "send a copy" , a copy of the email is sent to the user even tho it is not recieved by site owner.
And if you check error logs in the "tmp" folder of your root joomla installation directory on your server you will see a file with name MailERROR.log . You would see the error message of unsuccessful email attempts there as "From address not in member domain. Message not sent."
SOLUTIONS:
- On yahoo small business servers first of all you need to setup a spesific email address for PHP/Perl mails.
check out here => http://us.1.p3.webhosting.yahoo.com/phpmailsetup Once you set up a default php/perl mail address for your website u are ready to go to next step.
- Fix for "send email to friend":
Open the following file on your text editor: components/com_mailto/controller.php on the 148th line make the code change mentioned below: recent code you will find on the line 148:
Code:
if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )
new code you have to put instead of the code above:
Code:
if ( JUtility::sendMail('TheDefaultPHPperlEmailAddressYouSETonFirstStep', $sender, $email, $subject, $body) !== true )
replace TheDefaultPHPperlEmailAddressYouSETonFirstStep with the email adress you set up as default PHP/Perl address on first step( for example=
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
) save the file and upload it back on your server. You are done so the "email to friend" link should be working successfully now.
- Fix for "Contact Us Page" Emails:
Open the following file on your editor: components/com_contact/controller.php on the 163th line make the code change mentioned below: recent code you will find on line 163:
Code:
$mail->setSender( array( $email, $name ) );
new code you have to put instead of the code above:
Code:
$mail->setSender( "TheDefaultPHPperlEmailAddressYouSETonFirstStep" );
replace TheDefaultPHPperlEmailAddressYouSETonFirstStep with the email adress you set up as default PHP/Perl address on first step( for example=
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
) save the file and upload it back on your server. You are done so the "contact us page" emails should be working successfully now.
So simple but took me hours to find out what it takes. Has a beginner level of Joomla you need to learnern PHP. if your looking for php mail function in yahoo look here
|