General help

 
 
Picture of Mike Korn
SMTP Problems- Total Email Failure
 
I am in desperate need for a solution to our Moodle problem. I have asked our host -Sitegrounds - for help in the past, but no solution was ever offered. The automatic mail system in Moodle is not working anymore. In the past, the smtp host, username and password were left blank and there were no problems. We have since shifted our email host to Google Apps for Education. When smtp host is set to smtp.gmail.com (or any other smtp host is used for that matter) we get an error message:

ERROR: The following From address failed: username@host.com

Tried to send you an email but failed!

I get this error regardless of whichever smtp info I enter If smtp info is left blank, no errors - but no emails are sent. Our entire school depends on Moodle, is there any way you could possibly help with this situation? We are desperate.

Thank you in advance.

Mike
 
Average of ratings: -
Capt. Moodle
Re: SMTP Problems- Total Email Failure
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
I remember trying this a long time ago and getting an error because gmail uses ... tls? In any case, it is basically encrypted for security so I am not sure if you will be able to use gmail. I do not recall anyone successfully getting that to work. I ended up installing postfix on our production server and that has worked well. Best of luck and Happy Moodling!
 
Average of ratings: -
Picture of Jon Bolton
Re: SMTP Problems- Total Email Failure
 
Mike, this is only a guess - but GMail uses port 465 for outgoing SMTP mail instead of the normal SMTP port 25. You'll probably need to edit the port number in the lib files, perhaps class.phpmailer.php and/or class.smtp.php
 
Average of ratings: -
Picture of Denny Brown
Re: SMTP Problems- Total Email Failure
 
I am also a SiteGround customer. I'm having similar problems. The other responders might be right about the GMail problem. I'm trying to solve the problem of why the "normal" version suddenly stopped working. When did you first notice that the email had stopped working? ("normal" = blank entries in smtp host, username, pwd fields.)

There is more info on a similar thread that started last week.

-Denny
 
Average of ratings: -
Picture of Denny Brown
Re: SMTP Problems- Total Email Failure
 
I solved my problem. The solution is here. In my case, I left the smtp hosts etc. blank and used the normal email. I don't know if this will fix your original problem or not.

-Denny
 
Average of ratings:Useful (1)
Jim Whitacre
Re: SMTP Problems- Total Email Failure
 
Mike,

Did you ever figure out the answer to this? We just switched over to Google Apps and now none of the mail is going out no matter what I try to set things at?

Need help asap!
 
Average of ratings: -
Steve McGuire
Re: SMTP Problems- Total Email Failure
 
Sorry if this is answered somewhere. I have looked and will keep looking.

I am having problems similar to the ones appearing here, but being new to all this, I'm not exactly sure where to look for answers. If anyone can point me in the right direction, I'd appreciate it.

I'm using Moodle on Siteground and my students all have e-mail accounts through Google Apps. I would like to be able to send them e-mail at their Google addresses from within Moodle, but get a variety of error messages and/or files sent to my administrator e-mail account.

I just tried it and part of the message reads "SITEGROUND: the domain in the Header From value doesn't not match any of the local domains."

From within Moodle I get...

ERROR: Could not instantiate mail function.

I have e-mailed Siteground and they tinkered with my settings but in the end said it was a problem through Google Apps.

Any and all help would be appreciated.

--Steve
 
Average of ratings: -
Ophelia
Re: SMTP Problems- Total Email Failure
 
I'm away from my home computer, so I may get some of the terminology wrong. Siteground will need to adjust your MPAD records. The correct settings are on the google apps web site. At least that's the way it's been explained to me in the past.

mark miller
 
Average of ratings: -
Steve McGuire
Re: SMTP Problems- Total Email Failure
 
Mark,

I'm actually _at_ my computer (well, at a lab computer), but I'll still probably get my terminology wrong anyway.

I _thought_ that I had sent all the required settings to Siteground and they checked a few times. I don't recall MPAD and couldn't find it.

What's probably goofing me up is Google Apps requires both authentification and use of a different port, and I guess Moodle isn't ready for that. If someone has done it succesfully, please let me know!

If it's still not possible, are there any other possibilities for using Mail through Moodle and getting mail sent to my domain at Google Apps? I am also trying to use FileMaker to send students feedback outside of Moodle, but it wants to use my default mail setting and won't let me change the "Reply to:".

All these potentially useful applications and I keep getting stuck. I'll keep at it. The Moodle community has sure been a great help.

--Steve
 
Average of ratings: -
Picture of Chel Ramsey
Re: SMTP Problems- Total Email Failure
 
Hello. I run Moodle and my project uses the Gmail 'domains' service where we use Gmail as our email processor. IE: We have no email service on our server, we use Googles.

We run Moodle to train new developers/staff and so we needed the emails from the courses and Ask a Question type module.

I was able to get Gmail working under these conditions by doing the following:

In the Email section for smtp host I used: smtp.gmail.com
My @theseventhsungame.net email (Which again we use Gmail domains..)
The above email's password.


I then opened /lib/phpmailer/ and modified the following files:

class.phpmailer.php
around line 162

I changed var$Port =25; to 465

class.phpmailer.smtp
around line 30

I changed var $SMTP_PORT = 25; to 465

In the class.phpmailer.smtp file
around line 83

DIRECTLY after the Fucntion header, so the next line after the {
I added:
$host='ssl://' . $host;

I am now sending mail using the GMAIL feature.

http://www.theseventhsungame.net
http://www.theseventhsungame.net/tssuniversity

Hope that helps someone =)

Sincerely,
Chel Ramsey
admin@theseventhsungame.net


PS an additional step you may or may not need to take is to Un-comment the php_openssl.dll extension in php.ini I did not have to do this.





 
Average of ratings:Useful (3)
Capt. Moodle
Re: SMTP Problems- Total Email Failure
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Chel - Thanks for sharing how you were able to get gmail working for your server. This questions seems to come up time and again. Would you mind creating a page on Moodle docs? Perhaps something like: http://docs.moodle.org/en/Email_setup_gmail and then we can add a link to it from the Email_settings page. Peace - Anthony
 
Average of ratings: -
Picture of Doug Brennan
Re: SMTP Problems- Total Email Failure
 
This should be added to docs or the smtp config page should have a port field and ssl option
 
Average of ratings: -
Picture of Barry O Reilly
Re: SMTP Problems- Total Email Failure
 
Thanks Chel,

I've been looking for an answer to this for days!
 
Average of ratings: -
Picture of adam banasiak
Odp: Re: SMTP Problems- Total Email Failure
 
It works!

Thanks
 
Average of ratings: -
Picture of Oswel Morales
SMTP Problems - Total Email Failure - Moodle 1.9.3
 
I'v been using moodle for 2 years, the 1.8 was excellent, no problem at all!!!!
But then, i "updated" to 1.9.3 and my phpmail thing doesnt work, so i start configure smtp and NOTHING!!!!

i did what i been reed on this forum, but nothing help me at all, im avarage person in coding, so i know where to go and what to do, but nope, i doesnt work for me.

I tried some many ways, like:

smtp.gmail.com:465
smtp.gmail.com:587
smtp.gmail.com
...

user@googlemail.com
...

"password"


Need some help on 1.9.3, i dont know what else to do, really its been like a week trying to get it.

 
Average of ratings: -
Picture of Alexander Holsteinson
Re: SMTP Problems - Total Email Failure - Moodle 1.9.3
 
Oswald this PHPMailer of Moodle has some compatibility issues with PHP5.x since 4/2007 from what I have read and apparently is a bug that Moodle developers have not been able to fix

I am also dead in the water with the new user confirmation email failure in 1.9.4 stable and I checked today to see if it was discussed and assigned to a developer to fix but nope.... nothing surprise
 
Average of ratings: -
Picture of Jill Rochelle
Re: SMTP Problems- Total Email Failure
 

Question - when using this setup, in the emails sent from users, does their email address show up as the smtp email authentication that is being used here instead of their own email address?  If so, is that the way it is suppose to work?  If so, when a reply is done on an email, it never gets back to the one who sent the email.  Is there a workaround or bette solution without having to host your own mail server and addresses?  Does anyone else have this problem?

 
Average of ratings: -
Uddhava dasa
Re: SMTP Problems- Total Email Failure
 
Hi Jill,

If you use gmail, that's how it works, it wont let you send from another address.

I'm almost to the point of having to host my own email server... But i'm thinking of hacking the code, to use Swiftmailer library and throttling so that you could use with shared hosting mail servers.

Would this help you ?

Regards,
Ulises


 
Average of ratings: -
Live,Laugh & Love
Re: SMTP Problems- Total Email Failure
 
Hello all moodler
i have done lot of work on moodle.
on email problem
i used yahoo mail pop account.
by little bit Rnd you can do that.
create a yahoo acct
put username and password in smtp user and password.

 
Average of ratings: -
Picture of Jeff Wood
Re: SMTP Problems- Total Email Failure
 
Ulises,

I would be interested in known how your swiftmailer hack is coming. I'm on a shared host 9so is my wife) and throttling would be excellent.

Jeff
 
Average of ratings: -
Picture of Roger Kenner
Re: SMTP Problems- Total Email Failure
 
I have found the solution, with a little help from the Siteground technical support. It is not all that obvious at first, but makes sense in the end.

One must set up at least one bonafide email account on the site, so as to be able to authenticate with Siteground's SMTP. (The native php method does not work, as cron.php does not have a sufficient level of permission to run it).

Assume a domain abc.com
an email account xx@abc.com
with password yyy

Here are the Email settings that matter:
SMTP hosts: abc.com
SMTP Username: xx@abc.com
SMTP password: yyy

(Now here's the tricky part!)
No-replay address: xx@abc.com ( I am not certain it must be the same, but it must be a bonafide email address on your domain.)
Support name: xx@abc.com ( I am not certain this field figures in the outcome)
Support email: xx@abc.com

Why these two other fields? Apparently the info from these fields (Default being: no-reply@domain.com and admin@admin.com) finds its way into the FROM: field of the mailer. But Siteground does not allow its SMTP to send out mail whose FROM: address is not a bonafide Siteground email address (I am not 100% certain it has to be from the same domain, but I would guess so.). Such a policy probably prevents people from using their SMTP to spoof other people's email.

This policy may have been somewhat recent. I seem to recall my Moodle on Siteground could and did sent out forum mail in the past. I did a workshop for beginners and came home to find tons of email messages from their forums. My support email address was one not on siteground. That is probably what killed it.

I hope this will help others.

Roger Kenner
 
Average of ratings:Useful (1)
Picture of Rob Hill
Re: SMTP Problems- Total Email Failure
 
Please confirm, Does this fix work on 1.9.7?

I have a gmail account and did the above fix but it is not working.
 
Average of ratings: -
Picture of Jane Davies
Re: SMTP Problems- Total Email Failure
 

Hi Roger

I have followed your set-up instructions (using gmail account) and it seems to work fine if i'm logged in as the site administrator of moodle and post something on a forum.  If i login as a teacher of a course and do a post to a forum, it no longer emails the forum posts to the users - how do i get around this?

Regards

Jane

 
Average of ratings: -
Picture of Simon Gee
Re: SMTP Problems- Total Email Failure
 
Hi Roger & Folks,

Funnily enough, I have had the same problem...I have posted on this in other places where I've included more detail. e.g. here - http://moodle.org/mod/forum/discuss.php?d=147470&parent=644805. I have also posted version information and stuff on my Profile.

It must be some bug...I've done exactly what you've described here Roger, and everything else I can find and nothing has worked...and I have had no replies to my pleas for assistance...

I even did Verbose Debug Reports and according to the report, backed by an interpretation from my host, as far as Moodle and the Host Server are concerned the emails are being sent without errors...I have no other error reports, including via the Site Error Report system...so I have nothing left with which to troubleshoot.

Unfortunately this issue effectively makes Moodle ineffective for our purposes. Unless this next install miraculously works, we'll probably have to ditch it...or opt for Manual Confirmations, which from our perspective is effectively the same thing...

I do appreciated all of your efforts in sharing this information and if I learn anything new I will definitely reciprocate.

Cheers

Stephen Glanville.
 
Average of ratings: -
Picture of Lindley Bailey
Re: SMTP Problems- Total Email Failure
 
This might apply if you are running on a virtual machine (VM).

I just read a CNET (?) article about running VM's and problems with the VM wrapper configuration files not properly mapping to the correct ethernet (eth0 or eth1) adapter.
So.. the VM (moodle) was able to talk to the internet through eth0 but unable to email through eth1 because the VM wrapper had instructions to route those two requests through different adapters.

Either you, or your provider, log into your VM and manually send an smtp email to you (so you know it went through). Does it go through? If yes, Moodle is not configured properly, if no, have support look at how smtp is handled in your VM.

Note: For your tech to help troubleshoot. The CNET problem was that the VM was set to talk to the eth1 as named by the manufacturer. But for admin simplicity someone had manually renamed the adapter on that physical box to a unique name, and this condition does not produce errors! Moodle thinks it was successful because the info left the VM, but the info never left the physical box.

Sincerely,
Lin Bailey
 
Average of ratings: -
Picture of Simon Gee
Re: SMTP Problems- Total Email Failure
 
Dear Lindley,

Thank you for your kind assistance.

I don't know if the server I am using runs on a VM, but having run out of troubleshooting options on this issue (I have been working on this for over a week now and have tried every hack and script edit I can find on the Moodle Docs, Forums and Bug Tracker sites and have even installed Moodle 1.9.8 on a completely different dormain...so that's 2 installations, 1 in a subdomain, 1 in it's own domain in a root install and both exhibiting the exact same problem...no confirmation emails), and have once again engaged the further assistance of my host administrators who have escalated my issue for further investigation.

My apologies for not replying sooner, but I've only just now found your reply because I physically visited this thread to check for updates. Unfortunately subscribing to a thread doesn't seem to help in tracking responses, as replies become obscured in the myriad posts to the Forum/Course topic (e.g. Using Moodle), and I have not yet discerned a manner of clearly tracking replies to specific posts/threads yet...

Anyway, I just wanted you to know that I have passed your information on to my host admin support guys, just in case smile.

At this stage I can only hope it is such a problem. Any problem would be good at this stage, as then I would then have something to fix. I'm getting no error reports and even verbose email and php debug reports indicate that all is working well.

Many thanks again.

Cheers

Stephen G



 
Average of ratings: -
Picture of Lindley Bailey
Re: SMTP Problems- Total Email Failure
 
I have trouble keeping track too. So I occasionally click on my name (upper or lower right) on moodle.org and then go to my posts, and look for anything new after it. Clunky, but it catches things I missed.

Good luck with your problems, sincerely,
Lin Bailey
 
Average of ratings: -
Picture of Simon Gee
Re: SMTP Problems- Total Email Failure
 
Hi Lin,

Hehe smile Yep! I've been doing the same smile

Re: My problems: As it happens, I think I've found the problem. I happened across this little thread yesterday - http://moodle.org/mod/forum/discuss.php?d=106021.

Though on face value it seemed a bit specific, after a week of troubleshooting I was up for trying unusual dances and even poultices if they worked smile

Turns out that's all it was...Spam filters...with the added twist of empty Spam Folders (apparently Google have recently given their Spam Filters bigger teeth).

Anyway, in case it helps anyone watching:

Until now, standard procedure has been to check Spam Folders on Public Email Servers (e.g. Google, Hotmail, Yahoo et al). But I'll be advising our students/teachers that to ensure visibility of Confirmation emails in the above mentioned server's Spam Folders, that they first either place an 'allow domain' filter in their account or pop 'noreply@your.moodle.domain' and 'admin@your.moodle.domain' into their Contacts list before they Submit their Registration.

Though I still think it's strange that I haven't encountered this problem of invisible 'Spam Emails' with any of my WordPress site's registration emails.

The only upside for me out of all this is that I've learned a lot more about Moodle in a short time than I would have otherwise... smile

Thanks again to all those that have tried to help and good luck smile

Cheers

Stephen G



 
Average of ratings: -
Picture of david zacarias
Re: SMTP Problems- Total Email Failure
 
Hi, im upgrading to 1.9.8, and cheking what i done for work with gmail, i found that i made this changes.

/lib/phpmailer/ and modified the following files:

----------------------------------------------------------------
class.phpmailer.php
around line 162

I changed var$Port =25; to 465
-----------------------------------------------------------------
-----------------------------------------------------------------
class.smtp.php
around line 30

I changed var $SMTP_PORT = 25; to 465

In the class.smtp.php file
around line 83

DIRECTLY after the Fucntion header, so the next line after the {
I added:
$host='ssl://' . $host;
-------------------------------------------------------------------

Be carefull

- Saludos desde México -


 
Average of ratings: -
Picture of Wifred Jacquet Yeste
Re: SMTP Problems- Total Email Failure
 

Your solution has worked correctly in moodle 1.9.10. I have followed it strictly, as written above, and our smtp server, based on gmail apps account, awoke.

Thanks a lot.

 
Average of ratings: -
Picture of curt danforth
Gmail setup that worked for me in 1.9.8
 
The docs page that has this same info
http://docs.moodle.org/en/Email_setup_gmail
indicated to set the SMTP server to:
SMTP hosts: smtp.gmail.com:465

However I found that adding :465 in 1.9.8 after making the edits to the php files resulted in the SMTP service failing to connect.

It works without the port in the SMTP entry (makes sense given we set the port in the php already perhaps?)

Also the key for gmail seemed to also be in the post above by Roger Kenner related to setting the no-reply email to a valid gmail account. Thanks Roger

 
Average of ratings: -
Me and da boys!
Re: Gmail setup that worked for me in 1.9.8
 
Well I have the no reply set to a valid gmail account and attached is my edit of class.smtp.php I have tryed with and without the smtp port but I am still getting the error could not connect to smtp host so if anyone has any ideas I would appreciate it. I would hate to have to reconfigure a whole school's email.
 
Average of ratings: -
Picture of amit gupta
Re: SMTP Problems- Total Email Failure
 

Hey all,

Even i've encoutered this issue. I've tried all the things mentioned above but still no luck. I am getting this error:-

-----------------------------------------------------------------------------------------------------------------

SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

The following From address failed: my_email_id@gmail.com

could not send email!

------------------------------------------------------------------------------------------------------------

Kindly let me knw about any working things.

 

Regards,

Amit

 
Average of ratings: -
Picture of amit gupta
Re: SMTP Problems- Total Email Failure
 

This is to inform you all that my issue is partially resolved.
After making some smtp server settings as mentioned above, now i am able to receive user registration (confirmation mails) messages....but yet i am not receiving notification emails. 

Kindly let me knw anything if any one of u find anything related. It would be appreciable.

 
Average of ratings: -
Picture of Ian McNaught
Re: SMTP Problems- Total Email Failure
 

My advice is don't use Google as your SMTP server!

Even if you manage to get it working, you have the 500 messages/day limit and the messages are all sent from the one email account, not from the original sender (both these issues are listed on http://docs.moodle.org/24/en/Email_setup_gmail)

Instead of using Google for SMTP I recommend using a service such as Critsend. It's not free, but incredibly cheap (and you get 50,000 mails for free to start you off). It will take you about 5 minutes to get Moodle setup to use critsend, and you get useful reports and statistics too (e.g. how many users open the emails sent).

We've used them for 2 years now, sent about 500,000 emails and not had any problems.

 
Average of ratings:Useful (2)
Picture of amit gupta
Re: SMTP Problems- Total Email Failure
 

Hey Ian,

Thnx for the advice but i am using moodle for demo website. Actually as i told you that my issue is partially solved. I am getting emails for new user registration and existing user profile modifications.

My problem is that i am not recieving any notification mails regarding course updates. 

Kindly lemme knw if u find anything related to this issue. a solution would be appreciable.

Thnx  in advnce.

 
Average of ratings: -
Picture of Ian McNaught
Re: SMTP Problems- Total Email Failure
 

Hi Amit. Demo or not, I'd still recommend using something like Critsend instead of Gmail. It will literally take about 5 minutes to configure, as apposed to all the time you've spent trying to get Gmail to work. It may be a paid for service, but you get 50,000 mails for free to test it out, so for a demo site that should be ample. 

I'm not exactly sure what the notification emails are that you mention, but if it's something that Moodle is meant to send emails about then Critsend will deliver them.

 
Average of ratings: -
Picture of Jose Roberto
Re: SMTP Problems- Total Email Failure
 

Hi Ian McNaught

Thx for this tip.

I am using Critsend and I heve a question:

How config critsend in moodle 2.5?

 

Thanks a lot

cristofani

 
Average of ratings: -