PHPMAILER_RECIPIENTS_FAILED

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
bonaiva
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Thu Aug 02, 2007 2:29 pm

PHPMAILER_RECIPIENTS_FAILED

Post by bonaiva » Thu Mar 06, 2008 1:56 pm

Hello!
I can't use the contact component, because I tried use and received this messagem: [email protected]
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 [email protected] 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: [email protected]
Mailer: SMTP Server

What I must to do to solve my problem?
Thank you very much.
Bonaiva Soluções Profissionais
Visite: www.bonaiva.com.br

user deleted

Re: PHPMAILER_RECIPIENTS_FAILED

Post by user deleted » Thu Mar 06, 2008 2:03 pm

Moderator note; moving from Performance > Administration

User avatar
Regenerate
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Thu Aug 18, 2005 7:52 am
Location: The Netherlands
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by Regenerate » Tue Apr 01, 2008 3:42 am

I have the same problem :(
Guido Jansen
Conversion Manager, Magento e-commerce consultant
Company: userlegion.com
Twitter: @guido

Rauleanu
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Apr 12, 2008 8:45 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by Rauleanu » Sat Apr 12, 2008 8:51 am

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

CaioAdachi
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Jun 07, 2008 10:31 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by CaioAdachi » Sat Jun 07, 2008 10:43 pm

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.

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Tue Feb 24, 2009 1:10 am

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

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1368
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by airton » Tue Feb 24, 2009 1:35 am

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 [email protected]

Hope this helps,
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Tue Feb 24, 2009 1:54 am

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. ;)

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1368
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by airton » Tue Feb 24, 2009 2:08 am

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) :-\
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Tue Feb 24, 2009 2:22 am

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

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1368
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by airton » Tue Feb 24, 2009 6:18 am

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!
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Tue Feb 24, 2009 12:12 pm

Hey Airton,

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

Best regards,
Erick

bonaiva
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Thu Aug 02, 2007 2:29 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by bonaiva » Wed Feb 25, 2009 9:59 pm

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.
Last edited by bonaiva on Thu Feb 26, 2009 3:00 am, edited 1 time in total.
Bonaiva Soluções Profissionais
Visite: www.bonaiva.com.br

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1368
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by airton » Thu Feb 26, 2009 1:33 am

bonaiva, I sent you a PM. Please, reply.
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Thu Feb 26, 2009 11:56 am

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

bonaiva
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Thu Aug 02, 2007 2:29 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by bonaiva » Thu Feb 26, 2009 6:57 pm

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....
Bonaiva Soluções Profissionais
Visite: www.bonaiva.com.br

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Fri Feb 27, 2009 11:23 am

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!

bonaiva
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Thu Aug 02, 2007 2:29 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by bonaiva » Fri Feb 27, 2009 12:54 pm

: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
Bonaiva Soluções Profissionais
Visite: www.bonaiva.com.br

cutescar2nis
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Jun 09, 2009 9:56 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by cutescar2nis » Wed Jun 10, 2009 6:27 am

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

kcroteau
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jul 01, 2009 11:52 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by kcroteau » Wed Jul 01, 2009 11:59 am

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 [email protected]
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username [email protected]
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 [email protected]
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username [email protected]
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 [email protected]
From Name VAMP Research Contact
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Username [email protected]
SMTP Password PASSWORD
SMTP Host smtpout.vampresearch.com

cutescar2nis
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Jun 09, 2009 9:56 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by cutescar2nis » Fri Jul 03, 2009 12:52 am

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!

stwins
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Feb 25, 2009 9:57 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by stwins » Wed Sep 16, 2009 10:38 am

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 !

braderpa
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Sep 16, 2009 5:12 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by braderpa » Wed Sep 16, 2009 11:07 am

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

stwins
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Feb 25, 2009 9:57 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by stwins » Thu Sep 17, 2009 1:22 pm

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.
--------------------------------------------------------------------------

User avatar
luisarriola
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Sep 30, 2009 8:58 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by luisarriola » Wed Oct 14, 2009 10:47 pm

Thank you Airton and CiaoAdachi.

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

God bless you guys.

splitpierre
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Dec 01, 2009 5:54 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by splitpierre » Tue Dec 01, 2009 7:18 pm

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 OBS: My joomla is not sending an activation link, or reset pass request, but my contact form works fine...

User avatar
MeganE
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 15, 2009 5:35 pm
Location: Stamford, UK
Contact:

Re: PHPMAILER_RECIPIENTS_FAILED

Post by MeganE » Sat Jan 02, 2010 5:18 pm

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

v60edol
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jan 11, 2010 12:36 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by v60edol » Tue Jan 19, 2010 7:31 pm

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?

erickpaulino
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Feb 24, 2009 1:04 am

Re: PHPMAILER_RECIPIENTS_FAILED

Post by erickpaulino » Tue Jan 19, 2010 11:33 pm

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

v60edol
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jan 11, 2010 12:36 pm

Re: PHPMAILER_RECIPIENTS_FAILED

Post by v60edol » Wed Jan 20, 2010 2:03 am

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: [email protected]
From Name: [email protected]
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?
Last edited by v60edol on Wed Jan 20, 2010 12:23 pm, edited 1 time in total.


Locked

Return to “Administration 1.5”