Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Mail Working well usgin the extension but magento 2 is not sending any emails #101

Closed
rintish opened this issue Feb 28, 2018 · 24 comments

Comments

@rintish
Copy link

rintish commented Feb 28, 2018

I have Magento version 2.2.0 (Multi-store)

PHP Version 7.0.27 & I have used Zoho SMTP

Test mail is working well but any transanal mail is not sending.

@srenon
Copy link
Contributor

srenon commented Feb 28, 2018

@rintish ... After entering your credential, did you get one or two test email?

@rintish
Copy link
Author

rintish commented Feb 28, 2018

@srenon yes, I get 2 test email.

@rintish
Copy link
Author

rintish commented Feb 28, 2018

@srenon I try many time manually send email in order section but there is no mail coming in my mail account and I create new user there is no welcome mail comes and forgot password mail not comes

using your extension testing mail working well but all other mail has been not sending

After put username and password clear all cache, re-indexing and crong job working well. all thing try but can't get solution.

@srenon
Copy link
Contributor

srenon commented Feb 28, 2018

This is an issue that I can not reproduce (#71), therefore I can not fix it without access to a store with the issue.

What I would recommend

  1. Try to configure the admin testing screen using the same "to" email as one of the orders that not working

  2. Debug by putting a breakpoint at https://github.com/magepal/magento2-gmail-smtp-app/blob/master/Plugin/Mail/TransportPlugin.php#L115 and look at the $smtpConf values to see if they are correct

  3. contact your mail server tech support to see if they are any authentication errors generated by there sever when you try to send an email.

@srenon
Copy link
Contributor

srenon commented Mar 6, 2018

@rintish .... Are you still having issues?

@mdivpl
Copy link

mdivpl commented Mar 8, 2018

Hi! I have the same problem. I'm getting transaction mails with blank FROM field. Of course I have configured E-mails in the shop configuration.

I configured my own SMTP server

@srenon
Copy link
Contributor

srenon commented Mar 8, 2018

@mdivpl ... Are you running single or multi-store?

@mdivpl
Copy link

mdivpl commented Mar 8, 2018

I have: single store, Magento 2.2.3, magento2-gmail-smtp-app 2.5.0.

I noticed that, when I set: "Set From" -> Yes, "Set Reply-to" -> Custom and I write an email in the field "E-mail for reply" than I'm getting the emails with "FROM" mail from "E-mail for reply"

It's looking like problem with getting the fiels from magento settings in regards Shop's emails.

@srenon
Copy link
Contributor

srenon commented Mar 8, 2018

@mdivpl .... you stated that you are having the same issue as the previous user (which is not getting email).... but you also stated that you are getting the email from the reply-to address.

So I'm not 100% sure I understand your issue

@mdivpl
Copy link

mdivpl commented Mar 8, 2018

I made a few tests again and you right, it's not the same problem. Generally sending the emails working, but I'm getting the emails with blank "FROM" information. When I'm sending test email, I'm getting first (1/2) email correct with "FROM" header and second one blank (2/2). Any emails form magento are sending with blank information "FROM:"

Should I open new issue?

@srenon
Copy link
Contributor

srenon commented Mar 8, 2018

Take a look at #101 (comment) and check what email is pass to line number 94.

It is possible that your mail server is changing the "from" address (for security reason)

@mdivpl
Copy link

mdivpl commented Mar 8, 2018

I'm sorry, but I'm not good skill in php and magento. Can you explain what you mean about 'admin testing screen'? If you bring how to do it link. I will be grateful. I would like to check this variable.

@srenon
Copy link
Contributor

srenon commented Mar 8, 2018

I'm referring to

image

but if you are not good with Magento/PHP then it may be a little difficult

@PeRoland
Copy link

PeRoland commented Mar 9, 2018

hi
i have the same problem
magento 2.2.3
magento2-gmail-smtp-app: 2.5

if i test my smtp configuration i got the following error
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /.../vendor/magento/zendframework1/library/Zend/Mail/Protocol/Smtp.php on line 206

but the test email arrives..

if i create an account or place an order i don't get any email. in the logs i can find only the error mentioned.
do you have any idea how to solve it?

thx!

@srenon
Copy link
Contributor

srenon commented Mar 9, 2018

@PeRoland... Did you get one or two emails (during testing)?

Your error should have something to do with you SSL cert ... see https://stackoverflow.com/questions/17084886/ssl-error-routinesssl3-get-server-certificatecertificate-verify-failed

@PeRoland
Copy link

PeRoland commented Mar 9, 2018

only one
thx for the link, but the certificate is valid, i tested it.
but... maybe this is the error. the server starts on port 25 and then changes to starttls..
could this be the error?
i tested the smpt also with a local smpt with no certificate an no username.
but also in this case i got the same error
(strange since there is no ssl/tls)

@srenon
Copy link
Contributor

srenon commented Mar 9, 2018

During testing, you should get 2 emails.

The first one test basic server config using Zend_Smtp
The second one test sending email with Magento setting

@srenon
Copy link
Contributor

srenon commented Mar 9, 2018

@PeRoland ... also take a look at #59

@srenon srenon closed this as completed Apr 10, 2018
@jpelayo
Copy link

jpelayo commented Aug 13, 2019

Same problem for me with Magento 2.3.2 + php 7.2 . SMTP works in test mode , but I can't send an invoice, for instance. I removed sendmail to make sure it does not fall back to php mail() . BTW, only the first 1/2 mail arrives. I'm trying Amazon SES.

@srenon
Copy link
Contributor

srenon commented Aug 13, 2019

@jpelayo ... if you having an issue please open a new ticket. Also, all our test environment use of Magento 2.3.1 with PHP7.2.x or Magento 2.3.2 with PHP 7.1.x without any issues. So more than like your issue is caused by something in your environment.

@jpelayo
Copy link

jpelayo commented Aug 13, 2019

Is there any indication I can follow to debug this? There is no trace of the problem in the logs and I can't figure out a starting point.

@srenon
Copy link
Contributor

srenon commented Aug 13, 2019

Enable x-debugger https://github.com/magepal/magento2-gmail-smtp-app/blob/master/Plugin/Mail/TransportPlugin.php#L60 then try resending an order confirmation email

@jpelayo
Copy link

jpelayo commented Aug 14, 2019

For now, I added a debug message to see if it entered:

if ($this->dataHelper->isActive()) {
if (method_exists($subject, 'getStoreId')) {
\Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->debug('MagePal is ACTIVE');
$this->storeModel->setStoreId($subject->getStoreId());
}

And it did:
main.DEBUG: MagePal is ACTIVE [] []

Then I took a look at /var/log/maillog and saw that local postfix/smtp was used;
postfix/smtp[14059]: CEE4E4A0E4D ... Accepted for delivery

I uninstalled postfix and then

main.ERROR: Unable to send mail: Unknown error [] []

Looks like somehow it was using php Mail() instead of SMTP

@srenon
Copy link
Contributor

srenon commented Aug 14, 2019

@jpelayo.... Base on your previous message I can not tell if your issue is fixed or not, but it more than clear that it is a server config issue and not an extension issue. Let me know if you need some referral to Magento hosting provider that normally have zero issues with our SMTP extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants