Using SMTP settings for Google Apps Email

Anyone using Google Apps here for their email?



I do, and no matter the settings it doesn’t seem to be able to work (get error messages when trying to send anything out).



The standard settings according to google would be:



smtp.gmail.com

user@yourdomain.com

password



Tried adding ports at the end of the smtp address (:465) but to no avail.



If I select ‘php’ it works fine, going through my server, but of course the ‘sender’ address is the default server mail which has nothing to do with my company.



Anyone get it working? (for clarity this is google apps mail, rather than gmail, where you use your own domain within gmail)

Hello Trixman.



I’m having the same issue. Subscribed!

I looked into this and it appears that its not available for hosted users. It does appear that SMTP works with normal gmail accounts, but they are rate limited.



Anyone else have any information?

While we are on the subject:



If I have mydomain.com and I want to use Googleapps email for only me2mydomain.com and not the other email addresses is that possible?



Then I would like to use Thunderbird as my email client.



All using the standard free edition.



Looking at the instructions it seemed to be an all (email addresses) or nothing setup.



But I may have been confused…

It appears that SSL is required for mail via google apps to work.

[url]http://forums.kayako.com/f62/using-google-apps-smtp-15469/[/url]

This may be an alternative:

[url]http://www.google.com/support/forum/p/Google+Apps/thread?tid=1780781e814d05e6&hl=en[/url]



I don’t have an ssl certificate to play with yet though…

I don’t know whether any of you are still stumped by this. I got it figured out and wanted to share this just in case it might help anyone.



First, read this knowledgebase article and make the changes to the code as detailed there: [url]CS-Cart Documentation — CS-Cart 4.15.x documentation



Then, in your Administration>Settings>Email choose SMTP for method and use these settings:



SMTP Host: smtp.gmail.com:465

SMTP username: email address of your Google Apps account

SMTP password: password of Google Apps account



Place a check mark for “Use SMTP authentication.”



IMPORTANT: make sure port 465 is unblocked in your server firewall.



If you follow these instructions and it still doesn’t work, post back here and I’ll try to help, since I have it working on my site.

I had SMTP via Google Apps working with the following settings:



Host: gmail-smtp-in.l.google.com

SMTP username: my email address

SMTP password: my email password

Authentication: Unchecked.



But it’s stopped working! It fails with a ‘cannot authenticate’ message (if authentication is checked) and a ‘no such user’ error if authentication unchecked.



I have tried the settings described above and the code changes in the knowledgebase (thanks kingsleypress) but can’t make it work. I’m on 2.1.1, have tried reverting but that doesn’t work. I am in the process of fiddling around with an SSL cert on the server so am worried that has had some effect though my host thinks not.



Any help greatly appreciated!

This will effect some of you that are hosted on servers running the CSF firewall.



If the following setting in its configuration is activated it will block your ability to use outside SMTP servers.



SMTP_BLOCK



“This option will help prevent the most common form of spam abuse on a server that bypasses exim and sends spam directly out through port 25. Enabling this option will prevent any web script from sending out using socket connection, such scripts should use the exim or sendmail binary instead”

Thanks S-Combs, I looked into this. No luck, SMTP_BLOCK isn’t activated.



A major pain! Anyone else suffering from Google Apps for SMTP not working on their site?

Google Gmail now [COLOR=Red]requires[/COLOR] SMTP Authentication.



If Authentication isn’t working it’s a no go.



Also you can try using port 25 (with SSL), 465 (with SSL) or 587 (with TLS) as they are suppose to be working on SMTP also.



From Google:

[SIZE=-1]Incoming Mail (POP3) Server - requires SSL:[/SIZE] [SIZE=-1]pop.gmail.com[/SIZE][SIZE=-1]

Use SSL: Yes

Port: 995 [/SIZE] [SIZE=-1]Outgoing Mail (SMTP) Server - requires TLS or SSL:[/SIZE] [SIZE=-1]smtp.gmail.com[/SIZE][SIZE=-1] (use authentication)

Use Authentication: Yes

Port for TLS/STARTTLS: 587

Port for SSL: 465 [/SIZE] [SIZE=-1]Account Name: [/SIZE] [SIZE=-1]your full email address (including @gmail.com or @your_domain.com) [/SIZE] [SIZE=-1]Email Address: [/SIZE] [SIZE=-1]your email address (username@gmail.com or username@your_domain.com) [/SIZE] [SIZE=-1]Password: [/SIZE] [SIZE=-1]your Gmail password [/SIZE]

Hi there,



Has anyone resolved this?

We are still getting errors like this.



Error [color=#B94A48]Message could not be sent.[/color]

[color=#B94A48]Mailer Error: SMTP Error: Could not authenticate.[/color]”



Does not having SSL cause this problem?



We are using google apps email id and have provided the correct details to authenticate.

Any help would be greatly appreciated.



Regards,

NaMo

You have to change the port number manually in the php mailer class. Cs-cart does not make this a configurable option from the admin.

Hi tbirnseth,



Could you be a bit more specific regarding which php mailer class(in terms of file location)? :)



Regards,

NaMo

For V2/V3 it's in lib/phpmailer/class.smtp.php

For V4 it's in app/lib/other/phpmailer/class.smtp.php



However, you can use the 'send_mail_pre' hook to set $mailer->SMTP_PORT to whatever you want which is what I would recommend



But the port should really be part of the smtp configuration screen.

Hi tbirnseth,



I couldn't find the $mailer variable in the class.smtp.php.



But, will it work if I just modify the $SMTP_PORT found in the class.smtp.php and set it to the required SMPT_PORT?



Regards,

NaMo

The $mailer variable is set in fn_send_mail() function. It is passed to the hook. It is a “class pointer” so you will not find it in the class code.



My belief is that you should hire a developer to do this for you. Anyone proficient in cs-cart and php should be able to do it for you in fairly short order.

Hello NaMo!



Thank you for the message.



[size=4]To resolve the issue please try taking steps from the E-mails are not sent to the gmail account[/size] article of our Knowledge base. Please let note that for CS-Cart or Multi-Vendor of 4th branch, you should edit the file located in the app/lib/other/phpmailer/class.smtp.php directory of your CS-Cart or Multi-Vendor installation.



I hope this will help you.





Anastasiya Kozlova

CS-Cart Support team

Hi [color=#282828][font=arial, verdana, tahoma, sans-serif]Anastasiya,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Thanks for the response but unfortunately this didn't work.

When we turned on the SMTP authentication, then it pointed out that "[/font][/color][color=#B94A48]Message could not be sent.[/color]

[color=#B94A48]Mailer Error: SMTP Error: Could not authenticate.[/color][color=#282828][font=arial, verdana, tahoma, sans-serif]"didn't work and when we unticked it then we got the following error as attached in the screenshot.

We have also deleted the cache and have entered the corrrect details.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Kindly let us know what should we do.[/font][/color]

email.PNG

Dear NaMo!


[quote name='NaMo' timestamp='1396596061' post='180943']

Hi [color=#282828][font=arial, verdana, tahoma, sans-serif]Anastasiya,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Thanks for the response but unfortunately this didn't work.

When we turned on the SMTP authentication, then it pointed out that "[/font][/color][color=#B94A48]Message could not be sent.[/color]

[color=#B94A48]Mailer Error: SMTP Error: Could not authenticate.[/color][color=#282828][font=arial, verdana, tahoma, sans-serif]"didn't work and when we unticked it then we got the following error as attached in the screenshot.

We have also deleted the cache and have entered the corrrect details.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Kindly let us know what should we do.[/font][/color]

[/quote]



Thank you for the screen shot attached.



As far as I see from your screen shot, SMTP authentication is not activated in your mail client. In this case I recommend you to take the steps from this article to learn more information on how to use Google's SMTP server.



I hope this will help you.

Thank you.





Anastasiya Kozlova

CS-Cart Support team

Hi [color=#282828][font=arial, verdana, tahoma, sans-serif]Anastasiya,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]We went through the above post and all the configurations are properly setup as mentioned.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Also as I'd mentioned you in the above post, that when we'd turned on the “Smtp authentication” in the email settings in Cs-Cart, then we had got the following message [/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif]“[/font][/color][color=#B94A48][font=arial, verdana, tahoma, sans-serif]Message could not be sent.[/font][/color]

[color=#B94A48][font=arial, verdana, tahoma, sans-serif]Mailer Error: SMTP Error: Could not authenticate.[/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif]”

We have the correct credentials setup.

Could you verify at your end while testing it with a google apps account in a demo setup and let us know whether it's a bug or not?

Also we are using the mv4.0.3 edition

Regards,

NaMO[/font][/color]