The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Nov 13, 2009 11:14 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
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.

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


Top
 Profile  
 
PostPosted: Mon Nov 23, 2009 6:54 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 04, 2008 4:18 pm
Posts: 31
Jason,
You ROCK!

Thank you.


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 6:58 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 30, 2009 6:26 am
Posts: 5
Hey Jason,

Hoping you could shed some further light on this problem. I opted to use the 'Contacts' component that is native to Joomla (I'm running v1.5.15).

In doing so I thought I would have it running in no time, the only problem is that 16 hours later, I still can't get beyond the same errors you were getting. Thankfully, I ran into your posting.

In my case, I am only creating a contact page with the standard email form (name, address, subject, message) and my site is also being hosted on goDaddy.com.

So since yours was the post that closest resembled my problem, I went ahead and tried your recommend changes, as well as having read the original post by "squishyalt".

BEFORE
if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )

AFTER
if ( JUtility::sendMail("registeredEmail@GodaddyDomainName.com", "Email Name", $email, $subject, $body) !== true )

(OF course I went ahead and replaced "registeredEmail@GodadyDomainName.com" with my own)

However, I still can't seem to make it work. Could it be that there are other files (Other than \components\com_mailto\controller.php) that also need to me modified. By the way, I have checked my server configuration at least 20 times, and did call goDaddy a few times during the 16hrs just to make certain I hadn't missed anything!

In summary, after having made the changes that you have recommended, I am still getting the same "PHPMAILER_FROM_FAILEDxxxxxx@hotmail.com" error message. Any other tricks you might have come across that you can recommend?

Also, any chance you can post your controller.php file contents (while removing your email address and such), I'm hoping that I'll find the difference while comparing the two...

I don't anything would be helpful at this stage of the game...

Thanks in advance,
Al :geek:


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 10:50 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 04, 2008 4:18 pm
Posts: 31
Hi Al,
It took me hours to follow the instructions because there was a delay in the emails being sent, so I thought the configuration was wrong. What did the trick for me was the SMTP host.
relay-hosting.secureserver.net

When testing the configuration I changed the subject line and actually included all my settings in the email body so when the emails finally did come in, I could see which configuration settings worked.

After 16 hours though, you may want to use one of the free contact forms. They are easier to set up.


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 4:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
arivera99 wrote:
Could it be that there are other files (Other than \components\com_mailto\controller.php) that also need to me modified.

Yes. There absolutely are. In fact I've been meaning to get back over here and add an additional post with some stuff I've found since I started this thread.

At this time I cannot specifically answer your question. Meaning, I do not have the exhaustive list of every file that uses the "JUtility::sendMail" function. However, I use Notepad++ to do the majority of my coding. It has an excellent "Find in Files" feature that will allow you to search through a directory and all sub-directories looking for specific text in the files. You can also provide a filter like "*.php" so that it will only search PHP files. I haven't tried using it to search an FTP directory... not sure that it can. But I did download the entire Joomla! directory to my hard [drive] and search it that way.

Using this method I found several other files that also used "sendMail". And a couple of them I have since changed.

Another thing that I have changed was that I removed the hard-coded email address and email from name from the controller.php file and the other files where the sendMail function was used. The "configuration.php" in the Joomla! root directory provides all of the variables already defined with the information that you entered in the Global Configuration->Server->Mail Settings menu of the Joomla! administration area. I put the same email address and name into the "Mail From" and "From Name" fields that I was hard-coding into the "[Joomla! Install Directory]\components\com_mailto\controller.php".

The variables defined in "configuration.php" can be accessed through the "$mainframe" variable. I'm not 100% on all the details of how "$mainframe" works, but it is very regularly declared throughout the Joomla! application with the following line:
Code:
global $mainframe;


When called in Joomla!, $mainframe is an instance of JApplication (For all methods and properties or JApplication: http://api.joomla.org/Joomla-Framework/Application/JApplication.html). It has a function called "getCfg()".

So in your code, instead of hard-coding the email address and name like:
Code:
if ( JUtility::sendMail("registeredEmail@GodaddyDomainName.com", "Email Name", $email, $subject, $body) !== true )


You can do it like this (making sure that "global $mainframe;" has been called within this code's scope):
Code:
if ( JUtility::sendMail($mainframe->getCfg('mailfrom'), $mainframe->getCfg('fromname'), $email, $subject, $body) !== true )


That's some of the "new" stuff I've done. I'm still pretty new to Joomla! so I'm trying to understand it all as I go along. But I'm happy to help if I can.


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 5:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 30, 2009 6:26 am
Posts: 5
Greenbean, you're right! That was at leat an hour of the 16 spent!

Jason, you say
Quote:
I'm still pretty new to Joomla!
?

Don't feel bad, I'm soo new I still forget the exclamation point in Joomla! :laugh: (Honestly, less than a week at this; althought they have been looong nights!

In all sincerity, I've spoken to a relative who's been using Joomla! for well over 2+ years, and hit his head against his desk when I said I wanted to use the embedded component. He actually uses Chronoforms. Meanwhile, I was tampering with the CSS of the template to get it just perfect.

Appreciate your help.. I'll continue monitoring the post, while I chug along.


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 8:22 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
greenbean wrote:
It took me hours to follow the instructions because there was a delay in the emails being sent...

I'm sorry that there was such a huge delay for you. Using the settings I posted and entering my Gmail account as the destination email address, it has been taking about 30-60 seconds for me to receive messages I sent through the Joomla! website I'm working on.

Sending to my work email address can take up to 5 minutes for the email to come through. My company's website is hosted through GoDaddy, and I use Outlook to get email from our hosting account. . But that could be because my Outlook is set to check for new mail every few minutes.

That kind of a delay could either be caused by a problem with relay-hosting.secureserver.net or by whoever the receiving email host was. If it is being caused on GoDaddy's end, I might would recommend submitting a support ticket or putting in a call to them.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 3:22 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 04, 2008 4:18 pm
Posts: 31
Thanks, but what I meant was that I would send the email and when it didn't come, I thought the configuration was broken so I would try something else, then three~five minutes later I would get an email and not remember which configuration changes I had made... that's when I started including the entire configuration in the email body.

Also I have had horrible response time from GoDaddy lately (time outs durring peak hours daily from 5am-10am PST) on economy hosting and they keep telling me it's my site (the problem has been with ftp connectivity, so obviously they don't know what they are talking about.) - I get what I pay for.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 5:16 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Dec 01, 2009 4:43 pm
Posts: 4
Dose any body truly have this fixed.. I have tried most everything here and nothing works for me..

Paul


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 8:36 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
paulm21 wrote:
Dose any body truly have this fixed.. I have tried most everything here and nothing works for me..
Paul


With the settings and methods I've described in my posts above it is working great for me now.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 8:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
greenbean wrote:
Thanks, but what I meant was that I would send the email and when it didn't come, I thought the configuration was broken so I would try something else...

Oh okay... sorry about the misunderstanding. I was thinking there was something seriously wrong! :)

greenbean wrote:
Also I have had horrible response time from GoDaddy lately (time outs durring peak hours daily from 5am-10am PST) on economy hosting and they keep telling me it's my site (the problem has been with ftp connectivity, so obviously they don't know what they are talking about.) - I get what I pay for.


That's no good. In the last 4 years I've worked with a dozen or so websites that were hosted with GoDaddy (though I don't think any of them have been economy hosting). One of the sites had a very poor response time for FTP. With some patience I finally managed to get it resolved via GoDaddy's support through the ticket system. Seems like they may have just moved my hosting account onto a different server.

With GoDaddy, I've found that their phone tech people are decently knowledgeable. But for anything remotely challenging, you pretty much have to use the ticket system. Even then, the average resolution for me has been 4-8 emails back and forth, equating to about 2-4 days. But in each case I have had my problem resolved. In almost every case the first response back to my question looks like it was copied and pasted straight from the official "GoDaddy Resolution Guide" or something. So I replied back, reiterating the issue and why their first suggestion didn't work. And so on until it is eventually fixed.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 3:30 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Dec 01, 2009 4:43 pm
Posts: 4
Jwatts,

The mods described at the top of this post do work, Thank you very much for all you time and effort.. I should have clarified my issue. I'm have the same exact problem while using the Joomla contact form. Do you know how or where i could find the appropriate data strings that need modification?

Paul


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 5:58 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 02, 2009 5:30 am
Posts: 9
Jwatts,

Could you please post the pertinent section of your configuration.php file for this edit? I can not use my Joomla! control panel to change the Global configurations, I have to do it manually. This is what mine look like right now.


Code:
/* Mail Settings */
   var $mailer = 'SMTP server';
   var $mailfrom = 'name@domain.com';
   var $fromname = 'Name';
   var $sendmail = '/usr/sbin/sendmail';
   var $smtpauth = '0';
   var $smtpuser = '';
   var $smtppass = '';
   var $smtphost = 'relay-hosting.secureserver.net';


I keep getting the "could not initiate mail function" error.
I am using GoDaddy hosting.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 10:05 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 30, 2009 6:26 am
Posts: 5
:( Does it not suck when have a self imposed timeline ..

Anyway, the configuration has worked ...
However, it only appears to work for certain domains? Trust me, I've not hit my head...

If I send an email via the contact form with a TLD of say yahoo.com, hotmail.com, or gmail.com I get an error PHPMAILER_FROM_FAILEDa@yahoo.com

And by the way, I am using valid yahoo, hotmail.com and gmail.com email addresses... As do millions of other folk around the globe...

If I send an email from anyother domain, say me.com, or about.com, joomla.org, or even [yahoo.es] my email is sent successfully...

What nonsense is this ?


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 3:10 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
jarodd1 wrote:
Could you please post the pertinent section of your configuration.php file for this edit?

Here's what I got:
Code:
var $mailer = 'smtp';
var $mailfrom = 'no_reply@domain.com';
var $fromname = 'Domain Email';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpsecure = 'none';
var $smtpport = '25';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'relay-hosting.secureserver.net';


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 3:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
{Deleted by poster}


Last edited by jwatts on Wed Dec 02, 2009 5:01 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 4:50 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
paulm21 wrote:
Do you know how or where i could find the appropriate data strings that need modification?

Okay, since that last post I made I have found the contact manager and have added a contact to the site. I edited the "{Joomla! Install Directory}/components/com_contact/controller.php" file, and I now have successful emails through the contact form.

On lines 152 and 153, the code is already getting the configuration info:
Code:
$MailFrom    = $mainframe->getCfg('mailfrom');
$FromName    = $mainframe->getCfg('fromname');


On line 162, it sets the sender:
Code:
$mail->setSender( array( $email, $name ) );


I changed that line to this:
Code:
$mail->setSender( array( $MailFrom, $FromName ) );


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 4:59 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
arivera99 wrote:
If I send an email via the contact form with a TLD of say yahoo.com, hotmail.com, or gmail.com I get an error PHPMAILER_FROM_FAILEDa@yahoo.com


In my experience, the PHPMAILER_FROM_FAILED happens because the form is trying to send the message as if it is from the email address that was put in the "E-mail address:" field of the contact form. The send will only work if the from email address is a GoDaddy registered account. (I assumed that if you are on this thread you are using GoDaddy for your email, or you have a host that has similar requirements on outbound mail).

In the post right before this one, I detailed the changes I made to the "{Joomla! Install Directory}/components/com_contact/controller.php" file which is what controls the sending from this form. It was only a change to one line that allowed it to start working for me in this case.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 6:54 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 30, 2009 6:26 am
Posts: 5
:eek:

okay, Jwatts, you have hit the nail on the head! This is when I reflect on the need of a rating system or monetary compensation process. I'd gladly pay you your lunch... (alright, please don't send my your paypal account number with an invoice) But in all seriously you've hung in there, THANK YOU!

Here's the deal. I am hosting on goDaddy (feels more like 'who's your daddy')... and the fact remains that they block certain domains on the [relay-hosting.secureserver.net] server. That is why certain domain names, ie. so@exhausted.com can make it through, while others like, youfixedit@yahoo.com don't.

The changes you have recommended against "{Joomla! Install Directory}/components/com_contact/controller.php"
did the work for the contact page!

Here's how I have captured and implemented your recommendations!

Changes to Contact form are to: "{Joomla! Install Directory}/components/com_contact/controller.php"

jwatts wrote:

On line 162, it sets the sender:
Code:
$mail->setSender( array( $email, $name ) );


I changed that line to this:
Code:
$mail->setSender( array( $MailFrom, $FromName ) );




Changes to 'Mail to' form (using mail icon from within an article) are to: "[Joomla! Install Directory}\components\com_mailto\controller.php".


jwatts wrote:

On line 153, it sets the sender:
Code:
if ( JUtility::sendMail($from, $sender, $email, $subject, $body) !== true )

I changed that line to this:
Code:
if ( JUtility::sendMail($mainframe->getCfg('mailfrom'), $mainframe->getCfg('fromname'), $email, $subject, $body) !== true )




And there you have it Sir... PS.... Server Configuaration should remain: (where 'name@domain.com' is your email@domain_on_goDaddy.com, and 'Name' is the name of the email account you are using!)

/* Mail Settings */
var $mailer = 'SMTP server';
var $mailfrom = 'name@domain.com';
var $fromname = 'Name';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'relay-hosting.secureserver.net';

From my end, goodnight!


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 7:55 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Dec 01, 2009 4:43 pm
Posts: 4
I have the forms working as well using a third party form; the default Joomla form did not have captcha functions. I found Aicontactsafe in the Joomla extensions area, it was rated well and free.

http://www.algisinfo.com/joomla/aicontactsafe.html Note: Its not module or plugin its a Component so look for it there once installed.

One feature i really like is the message retention area. Yup when someone completes your form the info goes to a message area on your Joomla server as well as sending it to the designated godaddy email address.. So, If Godaddy decided to eat an email or two you can still find it on the server. Yes it captures failed form send attempts. very cool.

In order to make Aicontactsafe work I had to mod one php file as follows:

Path. /components/com_aicontactsafe/models/message.php

original
Code:
$isOK = JUtility::sendMail($from, $fromname, $email_recipient, $subject, $body, $mode, $cc, $bcc, $file_attachments, $replyto, $replytoname);


modified
Code:
$isOK = JUtility::sendMail("formaddress@godaddy.com", $fromname, $email_recipient, $subject, $body, $mode, $cc, $bcc, $file_attachments, $replyto, $replytoname);


Side Note: The above mention mods were the only ones necessary on my server because I chose the Third party route. There for Jwatts mods regarding default Joomla forms were not necessary for me and thus have not tried them.

As previously stated these mods are necessary because Godaddy is hosting my server and is very picky about relaying.


Last edited by paulm21 on Thu Dec 03, 2009 8:52 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 8:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 02, 2009 5:30 am
Posts: 9
Have done all edits but still do not receive any emails about registration confirmation? I am trying to run ccBoard btw. I no longer get any error message (Thanks so much!) but I still do not get a confirmation email.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 8:31 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Dec 01, 2009 4:43 pm
Posts: 4
jarodd1 wrote:
Have done all edits but still do not receive any emails about registration confirmation? I am trying to run ccBoard btw. I no longer get any error message (Thanks so much!) but I still do not get a confirmation email.


I had the same thing happen when i modified my forms component (Third party). When i filled in the form and clicked send I got a positive send conformation from my website but no emails ever showed up in my GOdaddy email account.

I would look for typo's or extra spaces or missing "". Try eliminating "Email Name" if you used it, that was my issue and once i removed it things worked great.

Good luck..


Top
 Profile  
 
PostPosted: Thu Dec 03, 2009 8:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
arivera99 wrote:
I'd gladly pay you your lunch...

And I'd certainly let you! No problem though. Happy to help. This issue has been a beast for me, and based on the info I was getting from this forum and elsewhere on the net, other people have had this issue. But I haven't seen any complete solutions anywhere else. So hopefully all the posts on this thread will continue to help.


Top
 Profile  
 
PostPosted: Fri Dec 04, 2009 1:34 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 02, 2009 5:30 am
Posts: 9
well I have pretty much done everything I can think of and still no dice.. I have tried one last thing by putting the field values in the config.php file where you said to leave them blank, just waiting to see if I get an email. If that doesnt work does anyone have ANY suggestions? I am about to go crazy here


Top
 Profile  
 
PostPosted: Fri Dec 04, 2009 3:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
jarodd1 wrote:
I keep getting the "could not initiate mail function" error.

Jarodd1, are you using Joomla! v1.5? Just curious because this is a Joomla! generated error and you quoted your error as being "could not initiate mail function" but I can't find that error in the Joomla! source files anywhere. I did find a VERY similar error message though: 'Could not instantiate mail function.' I first just want to verify that this is the message you are getting.

In a more recent post you said that you weren't getting error messages anymore, but you still aren't getting mail. That makes me wonder if there is still an error with the mail function that's not being reported.

The only place I found this error besides in the English translation pages was in ".\libraries\phpmailer\phpmailer.php". That makes me think that your code is trying to use the PHP Mail Function instead of the SMTP Server.

In the configuration.php settings you posted, you have
Code:
var $mailer = 'SMTP server';

But in my configuration.php settings, it says
Code:
var $mailer = 'smtp';

Is it possible that it's not recognizing the value string so it is defaulting to the PHP Mail Function?

Okay, I just did a search. In ".\libraries\joomla\factory.php" is the following code:
Code:
// Default mailer is to use PHP's mail function
switch ($mailer)
{
   case 'smtp' :
      $mail->useSMTP($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport);
      break;
   case 'sendmail' :
      $mail->useSendmail($sendmail);
      break;
   default :
      $mail->IsMail();
      break;
}

This is in the function
Code:
function &_createMailer()

The switch case here is looking for "smtp" as the string.


Top
 Profile  
 
PostPosted: Fri Dec 04, 2009 10:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 02, 2009 5:30 am
Posts: 9
Quote:
I did find a VERY similar error message though: 'Could not instantiate mail function.'


That is the message I was getting. Somehow I turned off the activation email and I cannot figure out where in the code I did that. (I cant write to my config file from the admin dashboard) There fore I cant duplicate the error since I turned of the required activation.

My config file also says "smtp" for the mail settings not "SMTP server"


Top
 Profile  
 
PostPosted: Sun Dec 06, 2009 9:51 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Dec 06, 2009 9:38 pm
Posts: 4
Jason,
Thanks for your post. It was right on target and your "fix" worked perfectly. I was living your pain with the same problem on my site (Joomla 1.5 on IIS) until I came across your post. I had read the squishyalt post, but your directions were more specific and helped me clear-up the same problem on my site. Much appreciated. :D


Top
 Profile  
 
PostPosted: Mon Dec 07, 2009 4:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
jarodd1 wrote:
Somehow I turned off the activation email and I cannot figure out where in the code I did that.

It's in the database. In the `jos_components` table, one of the records has the `name` field equal to 'User Manager'. The `params` field of this record contains a new-line separated list of parameters, one of which is 'useractivation=0'. Change the '0' to a '1'.


Top
 Profile  
 
PostPosted: Mon Dec 07, 2009 4:18 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 02, 2009 5:30 am
Posts: 9
'useractivation=1' <- This was already in the field.


Top
 Profile  
 
PostPosted: Mon Dec 07, 2009 5:20 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 06, 2009 9:05 pm
Posts: 22
The User Settings portion of the admin page looks like this:
Image

The values in `jos_components` -> `name`='User Manager` -> `params` for me are:
    allowUserRegistration=0
    new_usertype=Registered
    useractivation=1
    frontend_userparams=1

The options for 'new_usertype' are:
    Registered
    Author
    Editor
    Publisher


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group