Page 1 of 2

PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Mar 06, 2008 1:56 pm
by bonaiva
Hello!
I can't use the contact component, because I tried use and received this messagem: PHPMAILER_RECIPIENTS_FAILEDmymail@domain.com
You can see my problem in http://www.grandestalentos.com.br/Fale%20Conosco

In user manager I created a new user and set e-mail to mymail@domain.com and group to publisher
In components/contacts I created a new contact and set: category and linked to user

But, when I try use the contact form in the front page and I check E-mail a copy of this message to your own address option I receive a copy in the e-mail address that I put in E-mail address* in this one.

The Global Configuration is:
SMTP user name: mymail=domain.com
Mail from: mymail@domain.com
Mailer: SMTP Server

What I must to do to solve my problem?
Thank you very much.

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Mar 06, 2008 2:03 pm
by Robin
Moderator note; moving from Performance > Administration

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Apr 01, 2008 3:42 am
by Regenerate
I have the same problem :(

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Sat Apr 12, 2008 8:51 am
by Rauleanu
Try PHP Mail Function instead of SMTP Server.



Mailer PHP Mail Function
Mail from yourmail+yourdomain.com
From Name YourName
Sendmail Path: /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username yourmail+yourdomain.com
SMTP Password yourpasword
SMTP Host mail.yourdomain.com

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Sat Jun 07, 2008 10:43 pm
by CaioAdachi
Hello,

in file components/com_contact/controller.php, line 162,

alter:

Code: Select all

$mail->setSender( array( $email, $name ) );
to:

Code: Select all

$mail->setSender( array( $MailFrom, $name ) );
$mail->addReplyTo( array( $email, $name ) );
My host don't allow set sender with guest mail.

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 1:10 am
by erickpaulino
Hi Caio Adachi,

Thank you for your help, it has been very useful to me. However, I still get the same error for the "tell a friend" form. Can you help me telling me which files and which lines I must edit to solve this problem definitely?

Thank you in advance,
Erick

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 1:35 am
by airton
erickpaulino wrote:Hi Caio Adachi,

Thank you for your help, it has been very useful to me. However, I still get the same error for the "tell a friend" form. Can you help me telling me which files and which lines I must edit to solve this problem definitely?

Thank you in advance,
Erick
Hi,
Depending on your settings, there are at least two possible causes for your issue.
First, if you set J! to use phpMail or sendmail and in the "Mail From" field you used an e-mail address that is not in the same server as your site, it is possible that your hosting is blocking the e-mails you send. If you have an e-mail account in the same server, try to use it in the "Mail From".
Second, if you are using SMTP, the same problem might occur if you use a "Mail From" address that is not in the same server that you set for the SMTP. Try to use an account in the same server as the SMTP. I.E. if you set the SMTP server to smtp.mail.yahoo.com use an account like user@yahoo.com

Hope this helps,

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 1:54 am
by erickpaulino
Hi Caio,

Thank you for your promptly reply! I've noticed that the problem is when I use an e-mail with a domain name that is different from that of my host. However, when sending the "tell a friend" e-mail, Joomla uses the guest mail to set the sender. That's what I'd like to change: leave the guest e-mail in the body of the "tell a friend" e-mail, but use the Joomla Admin e-mail as the sender.

Can you help me doing that?

Thank you,
Erick

PS: I've seen that you're brazilian, and so am I. My English is really awful, but I decided to keep talking in English so that other people can benefit from this conversation, just like I did. ;)

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 2:08 am
by airton
Hey, Erick.
Good to see fellow Brazilians around!
The problem you are experiencing is called email aliasing. Most hosts do not allow it.
I'll investigate it for you, but I'm afraid it's not possible without hacking core files. I'm off to work now, but I'll report back here as soon as I get a solution (or not) :-\

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 2:22 am
by erickpaulino
If you find a way to simply use a pre-defined e-mail as the sender instead of the guest given e-mail address, I'll be really happy.

Thank you once again!
Erick

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 6:18 am
by airton
erickpaulino wrote:If you find a way to simply use a pre-defined e-mail as the sender instead of the guest given e-mail address, I'll be really happy.

Thank you once again!
Erick
Hi, Erick!
I think I found a way. But, remember, it's a core hack! You'll have to do it again whenever you update your Joomla! ;)

Edit the file [webroot]/components/com_mailto/controller.php
Around lines 112 to 116 you'll find this:

Code: Select all

		$email 				= JRequest::getString('mailto', '', 'post');
		$sender 			= JRequest::getString('sender', '', 'post');
		$from 				= JRequest::getString('from', '', 'post');
		$subject_default 	= JText::sprintf('Item sent by', $sender);
		$subject 			= JRequest::getString('subject', $subject_default, 'post');
Change to (add last two lines):

Code: Select all

		$email 				= JRequest::getString('mailto', '', 'post');
		$sender 			= JRequest::getString('sender', '', 'post');
		$from 				= JRequest::getString('from', '', 'post');
		$subject_default 	= JText::sprintf('Item sent by', $sender);
		$subject 			= JRequest::getString('subject', $subject_default, 'post');
		$from_name    = JApplication::getCfg('fromname');
		$mail_from   = JApplication::getCfg('mailfrom');
Now, around lines 148 to 152 you'll have:

Code: Select all

		if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )
		{
			JError::raiseNotice( 500, JText:: _ ('EMAIL_NOT_SENT' ));
			return $this->mailto();
		}
Change to:

Code: Select all

		if ( JUtility::sendMail($from_name, $mail_from, $email, $subject, $body) !== true )
		{
			JError::raiseNotice( 500, JText:: _ ('EMAIL_NOT_SENT' ));
			return $this->mailto();
		}
This might solve your problem. I couldn't test it here because my server is a local host with XAMPP and I can't figure how to make the mail function work. I guess my corporate firewall is blocking it. So, if you have any problems with this hack, just report back.

Best of luck!

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Feb 24, 2009 12:12 pm
by erickpaulino
Hey Airton,

It worked perfectly at the first try! Thank you very much for your attention and kindness.

Best regards,
Erick

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Feb 25, 2009 9:59 pm
by bonaiva
Olá Erick Paulino e Airton. Eu também sou brasileiro como vocês e por isso resolvi escrever no nosso idioma (português brasileiro) para facilitar o nosso entendimento e de outros brasileiros (de 6 pessoas que postaram aqui, pelo menos 3 são brasileiras... um bom número :-) )
Bom, qd eu criei o tópico, eu estava com uma versão mais antiga do Joomla! que não me lembro (acho que 1.5.3) e com a solução dada pelo Caio Adachi:
Alterar:

Code: Select all

$mail->setSender( array( $email, $name ) );
por:

Code: Select all

$mail->setSender( array( $MailFrom, $name ) );
$mail->addReplyTo( array( $email, $name ) );
com essa dica, o meu "fale conosco" passou a funcionar bem. Mas eu não sei em que momento, pq não percebi qd parou de funcionar, mas voltei a ter esse problema e agora estou na versão 1.5.9.
Fiz o procedimento que o airton descreveu:
Acrescentei as linhas:

Code: Select all

      $from_name    = JApplication::getCfg('fromname');
      $mail_from   = JApplication::getCfg('mailfrom');
e substituí o if para :

Code: Select all

if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )
Mas, infelizmente, eu continuo recebendo o mesmo erro. Alguém pode me ajudar?
=====
Hi, I writed in brazilian portuguese, but now i'll try write in english.... So, I started this topic and I wanted solve my problem, but now I'm using 1.5.9 version and my problem return. I tried the procedures listeds in this topic, but I did'nt wanted sove one. I'm using the some configurations that I writed when I started this topic.
Can anyone help me? Thanks.

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Feb 26, 2009 1:33 am
by airton
bonaiva, I sent you a PM. Please, reply.

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Feb 26, 2009 11:56 am
by erickpaulino
Bonaiva,

I'm using version 1.5.9 too. I had to use both the Airton and Caio's code to make it work well. Did you re-apply the codes when upgrading to the latest version?

Good luck!
Erick

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Feb 26, 2009 6:57 pm
by bonaiva
Erick, I maked only airto's code... because in the version 1.5.9 don't exist $mail object than I thought that the code had changed. Can you post your controller.php code here?

Airton, I'll reply to you....

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Fri Feb 27, 2009 11:23 am
by erickpaulino
Hi Bonaiva,

Do exactly what Caio says. Go to your components/com_contact/controller.php, line 162, and you will find the line he mentions, which you'll have to change to the code he suggests.

Please note that there are two different files that you have to change: the com_contact/controller.php (Caio's code) and the com_mailto/controller.php (airton's code).

Write back if it doesn't help!

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Fri Feb 27, 2009 12:54 pm
by bonaiva
:D :D :D :D :D :D :D :D :D :D :D
Erick and Airton: Thank you very very much.......
I was confused and was working only in com_mailto, so I thought that the component had changed completely. :-[
You helped me a lot.
God bless.
Arthur

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Jun 10, 2009 6:27 am
by cutescar2nis
wah!!! i wish i can relate to this... it's my new problem right now, i'm trying to update an existing website right now, my task is to get the INQUIRY FORM working, meaning, the message in the inquiry form must be emailed to my email address once the submit button is clicked. i do hope to get a help because i can't move on without finishing this. and by the way i'm new to joomla. thanks

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Jul 01, 2009 11:59 am
by kcroteau
I am so close to throwing my hands up with this problem! I have made the changes that Airton and Caio mention to both files. I am using Joomla 1.5 and hosted at GoDaddy. My e-mail address is not from a seperate domain but the domain i have registered with GoDaddy. I have tried all three options and get the following errors. If it helps any this is happening when someone tries to create a user. :(

SMTP Server:
SMTP Error! Could not connect to SMTP host.

my settings for this are: (the settings are correct according to GoDaddy)

Mailer SMTP Server
Mail from kristophercroteau@vampresearch.com
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username kristophercroteau@vampresearch.com
SMTP Password PASSWORD
SMTP Host smtpout.vampresearch.com

when I try
PHP Mail Function:
Could not instantiate mail function.
Settings are: (I even tried with SMTP set to NO and i get same error)

Mailer SMTP Server
Mail from kristophercroteau@vampresearch.com
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username kristophercroteau@vampresearch.com
SMTP Password PASSWORD
SMTP Host smtpout.vampresearch.com

when i try
Sendmail:
I do not get an error but a success message saying e-mail is sent BUT no e-mail comes.

Settings are: (tried SMTP at both YES and NO)

Mailer Sendmail
Mail from kristophercroteau@vampresearch.com
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username kristophercroteau@vampresearch.com
SMTP Password PASSWORD
SMTP Host smtpout.vampresearch.com

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Fri Jul 03, 2009 12:52 am
by cutescar2nis
try gmail instead, mine is working now. by the way, is your website live already. the one that i've tested is live that's why i've seen the email thingy working. you can refer to this blog, this one helped me a LOT! and solved my misery!

http://forum.joomla.org/viewtopic.php?f ... 11&start=0

i do hope you can solve ypur problem now!

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Sep 16, 2009 10:38 am
by stwins
Hi airton,
I tried exactly what you give. done same changes but now I am getting error as :-
--------------------------------------------------------------------------------
Not Found

The requested URL /envngo/component/contact/ was not found on this server.
--------------------------------------------------------------------------------

Kindly help me in this. I know you can help me out. Please !

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Sep 16, 2009 11:07 am
by braderpa
Hi...this is my first post in this forum...

After i followed what Airton and Caio mention to both files ([webroot]/components/com_mailto/controller.php and components/com_contact/controller.php, line 162,) at last my problems resolved....

thanks a lot for all the tips

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Thu Sep 17, 2009 1:22 pm
by stwins
Hee I have also followed what Airton and Caio mention to both files ([webroot]/components/com_mailto/controller.php and components/com_contact/controller.php, line 162,) But my problem is not yet solved....
Can anybody help me?

After doing above changes I am getting following error:-
---------------------------------------------------------
Not Found

The requested URL /envngo/component/contact/ was not found on this server.
--------------------------------------------------------------------------

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Oct 14, 2009 10:47 pm
by luisarriola
Thank you Airton and CiaoAdachi.

I changed both the files you sugested and it solved my problem

God bless you guys.

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Dec 01, 2009 7:18 pm
by splitpierre
hi friends, im having this problem on my 1.5.9, follow steps, but not work yet, anyone can help me? i'm using smtp authenticated from gmail, good configs.

i'll show u my both files:
[webroot]/components/com_mailto/controller.php : lines 112 > 119

Code: Select all

$email 				= JRequest::getString('mailto', '', 'post');
$sender 			= JRequest::getString('sender', '', 'post');
$from 				= JRequest::getString('from', '', 'post');
$subject_default 	= JText::sprintf('Item sent by', $sender);
$subject 			= JRequest::getString('subject', $subject_default, 'post');
$from_name    = JApplication::getCfg('from_name');
$mail_from   = JApplication::getCfg('mail_from');
lines 151 -> 155

Code: Select all

if ( JUtility::sendMail($from_name, $mail_from, $email, $subject, $body) !== true )
{
    JError::raiseNotice( 500, JText:: _ ('EMAIL_NOT_SENT' ));
    return $this->mailto();
}
Now my [webroot]components/com_contact/controller.php : lines 159 -> 167

Code: Select all

$mail = JFactory::getMailer();
$mail->addRecipient( $contact->email_to );
$mail->setSender( array( $MailFrom, $name ) );
$mail->addReplyTo( array( $email, $name ) );;
$mail->setSubject( $FromName.': '.$subject );
$mail->setBody( $body );
$sent = $mail->Send();
Something wrong?
please help me =D im desperate with this!
still receiving

Code: Select all

PHPMAILER_RECIPIENTS_FAILEDmail@user.com
OBS: My joomla is not sending an activation link, or reset pass request, but my contact form works fine...

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Sat Jan 02, 2010 5:18 pm
by MeganE
I know this is an old thread, but I felt compelled to thank you guys. I am not good with computers by any means, but I was able to fix my mail issues thanks to y'all! Thank you forum!

I changed the smtp mailer to PHP mailer and everything seems to be working again!

What a relief!

Thanks again,

Megan ;D

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Jan 19, 2010 7:31 pm
by v60edol
Hello Everyone,

I'm haveing the same error afte change the suggested information by Airton, Caio and Erick.

The mail configured on Global settings is hosted by the Exchange Server 2007 on the same server that Joomla is installed over IIS. I'm able to receive the system message from joomla about the new user registration but the users still receiving the "PHPMAILER_RECIPIENTS_FAILED" error message and they don't receive the confirmation message to active their accounts (or if try to reset password.)

I'm using:
Joomla 1.5.13
Windows Server 2008 R2 x64 + IIS 7.5 + Microsoft Exchange Server 2007
PHP 5.2.12 Non Thread Safe
MySql 5.1.42 (Windows MSI Installer (AMD64 / Intel EM64T))

Any Suggestion?

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Tue Jan 19, 2010 11:33 pm
by erickpaulino
Hi v60edol,

I'm not a programmer, and that's why I ended up here asking for help. But I'll try to help you on what I can. Did you try every option on admin panel site->global configuration-> server->mail settings-> server ?

There are 3 options, try them all (php mailer, sendmail and smtp).

If you have already done that, I'll probably won't help much. Check your steps from the beginnig to see if you did everything right.

Good luck

Re: PHPMAILER_RECIPIENTS_FAILED

Posted: Wed Jan 20, 2010 2:03 am
by v60edol
Hi Erick (ou Olá, pois também sou Brasileiro).

I already tried all other options but the only option that I'm able to receive the System notification when a new user is created are:

Mailer: SMTP Server
Mail from: login@mydomain.com
From Name: login@mydomain.com
Sendmail Path: /usr/sbin/sendmail
SMTP Authentication: No
SMTP security: None
SMTP port: 25
SMTP username: myusername
SMTP Password: mypassword (or blank)
SMTP Host: localhost

Due I'm using Windows 2008 Server R2 and IIS 7.5 the "PHP Mailfunction" and "Send Mail" doesn't work for me. So I'm thinking that, if joomla is already able to connect to my Exchange Server 2007 and send to me (mailfrom) the system notification, there is only a problem with the configuration related to Recipient (mailto), but don't have idea witch line on Controller.php I'll need to change (and if is on joomla\components\com_mailto or joomla\components\com_contact folder).

Do you have any suggestion?