mendoh Posted February 27, 2023 Posted February 27, 2023 Hi guys. I have configured the email options in OSCv4 to use my client's website SMTP server for authenticated email sending, however, the order confirmation emails get sent straight to OSCv4 site owner's email spambox on a very regular basis and the same happens whenever a potential customer writes and email via the OSCv4 contact form. Therefore, I have applied my client's host and they are blaming it on the OSCv4 engine for forcing the contact form to use the customer's contact address as Sender. Their feed-back on this issue is as follows: "Please do check with them on how to configure their Form platform properly to relay SMTP email using ONE SINGLE valid email address and not the contact address the customer inputs, they should know that's a bad practice that will damage your domain's reputation" Now it seems to me pretty hard to believe that the OSCv4 developers did not take such things correctly into account and of course there is also a possibility that the host is telling me tales. Can anyone of you, OSCv4 developers, help me understand where the issue actually lies? Thank you Mendoh Quote
osCommerce-Official Posted February 28, 2023 Posted February 28, 2023 @Ivan Holbi will you please help here? Thanks! Quote
cjf1026 Posted February 28, 2023 Posted February 28, 2023 @mendoh, did you just setup SMTP via the admin panel? I am trying to setup SMTP for my separate mail server and I am not getting anything, I can't even seem to confirm if it's trying to make a connection to my email server. As for the contact form, I am glad you pointed that out, because my email server will NOT send any emails unless the email address is ON the server, and the name is precisely the email address. So OSC admins, please fix this. Mendoh, please let me know where you configured your SMTP and how you did it, is it TLS or just SSL? Did you have to click install under each configuration option in the admin backend? I can do without the contact form, however it is imperative I get the general email functioning so that I can prepare to go live. I'd greatly appreciate it. We definitely need a more in-depth writeup of how to configure mail for OSC. @osCommerce-Official - I'd be happy to write some forum how-to's, things like how to edit various words on a page via translations and themes, etc. Just let me know what you need! Quote
mendoh Posted March 1, 2023 Author Posted March 1, 2023 2 hours ago, cjf1026 said: I am trying to setup SMTP for my separate mail server and I am not getting anything Hello Chris. The path for email configuration is: Settings-> Configuration -> Email options; after clicking on Email options the following screen will appear: the configuration you see in the above picture contemplates the use of an authenticated SMTP email server and address (my host suggested the smtp port #587 and TLS as the correct configuration parameters): it actually allows OSCv4 emails (i.e.: contact form email messages, order confirmation/account registration messages) to be sent, HOWEVER, spam filters at my host level send them all straight to the [email protected] spambox and I will not receive them in my inbox unless I check my spambox and move them to my inbox. Almost needless to say, I had to send a few different messages and check my spambox to actually confirm that the email server was actually working. I guess I can say you and I are experiencing the same issue, yours being even worse than mine since your messages apparently get killed even before leaving the smtp server. Nonetheless, I would confirm that whenever it is the customer email address to receive a confirmation from the OSCv4 engine (e.g.: whenever an order is confirmed by a customer), the order confirmation email gets killed at smtp server level in my case as well and never reaches the customer's inbox. My host recommends smtp port#587 to go with TLS encryption, whereas if using SSL encryption they recommend using smtp port# 465. Clicking on "install" for each option in the admin backend is not strictly necessary for the email configuration parameters to go into effect, provided that they are all correct. Last but not least, as per my host's feed-back, OSCv4 developers should be able to offer a solution to this rather remarkable issue... Quote
cjf1026 Posted March 1, 2023 Posted March 1, 2023 That's probably what's happening to me but struggling to find that in my logs. My email server definitely works, I have been testing by sending a test customer a coupon and I get back "email sent". Though the email is nowhere to be found. 💡I'm running my mailserver in a docker container so I bet that's where my logs are. I'll have a look at share my results. I'll also try pressing install on all the settings. None-the-less, agreed, especially on contact form. Email cannot be from customer email (that's spoofing isn't it?). It needs to originate from admin email with a subject like "Contact Form From [email protected]). Quote
mendoh Posted March 1, 2023 Author Posted March 1, 2023 4 minutes ago, cjf1026 said: It needs to originate from admin email with a subject like "Contact Form From [email protected]). That is exactly what my host customer support told me. According to them, if your host does not enforce such policy, it is not a top-notch one and the e-commerce email engine should have provisions to avoid using the customer email address as the sender. 99% the issues you are having with your "ghost emails" depend on your host enforcement of the no email relay policy... cjf1026 1 Quote
cjf1026 Posted March 1, 2023 Posted March 1, 2023 Are you successful in sending customer order emails though? Or not yet? Because if sending from store email to a customer test email, it should work? Or that's landing I'm am outgoing spambox because it's spoofing the address? Quote
mendoh Posted March 1, 2023 Author Posted March 1, 2023 4 minutes ago, cjf1026 said: Are you successful in sending customer order emails though? This is what is happening on my side: case #1: sending an email from store email itself (e.g.: [email protected]) via PC email client to customer's email - works just fine; case #2: sending a customer order email from OSCv4 to customer email when the customer confirms an order - does NOT work (i.e.: no customer order email confirmation is ever received by the customer who confirmed the order); case #3: sending a customer order email from OSCv4 to store owner email address (I previously set the store owner email in the order email field "also send order email to", so that I could get a copy of each order email sent to an email address different than the customer's) - works but gets immediately and always sent to spambox; case #4: sending an email voucher to a customer email via the "My marketing tools -> Mail gift voucher" feature in admin - got the green "message sent" confirmation but actually does NOT work (i.e.: no email voucher is ever received by the customer); case #5: sending an email voucher to the store owner email address via the "My marketing tools -> Mail gift voucher" feature in admin - got the green "message sent" confirmation but actually does NOT work (i.e.: no email voucher is ever received on the store owner email address); so judging by the results I am having, it really seems to me that quite some tweaking is necessary to the OSCv4 authenticated email sending feature... Quote
cjf1026 Posted March 1, 2023 Posted March 1, 2023 (edited) Interesting - I am not even getting that. I just tried all 5 cases with the exception that of instead of using store-owner email, I use another email hosted on the same mail server for another domain of mine, and I am not getting anything, nothing in the email logs either.. I am going to jump into a new topic so im not taking over this one, as you are a little further ahead than me. Thanks for the info Mendoh and goodluck! Other topic: Edited March 1, 2023 by cjf1026 Quote
Ivan Holbi Posted March 1, 2023 Posted March 1, 2023 On 2/28/2023 at 1:34 AM, mendoh said: Hi guys. I have configured the email options in OSCv4 to use my client's website SMTP server for authenticated email sending, however, the order confirmation emails get sent straight to OSCv4 site owner's email spambox on a very regular basis and the same happens whenever a potential customer writes and email via the OSCv4 contact form. Therefore, I have applied my client's host and they are blaming it on the OSCv4 engine for forcing the contact form to use the customer's contact address as Sender. Their feed-back on this issue is as follows: "Please do check with them on how to configure their Form platform properly to relay SMTP email using ONE SINGLE valid email address and not the contact address the customer inputs, they should know that's a bad practice that will damage your domain's reputation" Now it seems to me pretty hard to believe that the OSCv4 developers did not take such things correctly into account and of course there is also a possibility that the host is telling me tales. Can anyone of you, OSCv4 developers, help me understand where the issue actually lies? Thank you Mendoh Hi Mendoh, We made the required changes to fix it from our end so this issue will be resolved in the next osCommerce version. Best regards, Ivan Quote
mendoh Posted March 1, 2023 Author Posted March 1, 2023 5 hours ago, Ivan Holbi said: We made the required changes to fix it from our end Ivan, thanks A LOT. I really appreciate your fast support and this is very reassuring for me as an OSCv4 user. I will be waiting for the new update release and proceed accordingly. Keep up the good work! Mendoh Quote
mendoh Posted March 6, 2023 Author Posted March 6, 2023 On 3/1/2023 at 2:26 PM, Ivan Holbi said: We made the required changes to fix it from our end so this issue will be resolved in the next osCommerce version. Hello Ivan, I have upgraded to the latest OSCv4 version and I can confirm that the contact form email sending issue has cleared and the contact form email is now being sent without being labelled as spam by the website host spam-prevention system. Likewise, whenever a new order is confirmed, the OSCv4 mailing system correctly sends a confirmation email to the store owner's email address, HOWEVER, the customer who confirmed the order receives nothing (i.e.: no email, no confirmation). Something similar happens when sending a gift voucher: the sent voucher correctly appears under "Gift vouchers sent" after a green "voucher sent" notice is displayed, however, the customer receives nothing in his inbox. For your better information, the customer above is using a hotmail.com email address. Is there something I am not considering or another issue is actually in place? Thanks in advance. Mendoh Quote
Ivan Holbi Posted March 6, 2023 Posted March 6, 2023 8 hours ago, mendoh said: Hello Ivan, I have upgraded to the latest OSCv4 version and I can confirm that the contact form email sending issue has cleared and the contact form email is now being sent without being labelled as spam by the website host spam-prevention system. Likewise, whenever a new order is confirmed, the OSCv4 mailing system correctly sends a confirmation email to the store owner's email address, HOWEVER, the customer who confirmed the order receives nothing (i.e.: no email, no confirmation). Something similar happens when sending a gift voucher: the sent voucher correctly appears under "Gift vouchers sent" after a green "voucher sent" notice is displayed, however, the customer receives nothing in his inbox. For your better information, the customer above is using a hotmail.com email address. Is there something I am not considering or another issue is actually in place? Thanks in advance. Mendoh Hi Mendoh, Regarding "HOWEVER, the customer who confirmed the order receives nothing (i.e.: no email, no confirmation)." most likely the e-mail template is not assigned to the corresponding order status. We cannot confirm it since the login details you provided us with do not have enough rights for us to see the order statuses in your admin area. Regarding "Something similar happens when sending a gift voucher: the sent voucher correctly appears under "Gift vouchers sent" after a green "voucher sent" notice is displayed, however, the customer receives nothing in his inbox." could you please confirm with the customer if the spam folder was checked? Best regards, Ivan Quote
mendoh Posted March 7, 2023 Author Posted March 7, 2023 Hello Ivan, thanks for your detailed reply. I will check in details and inform you accordingly. Mendoh Quote
mendoh Posted March 10, 2023 Author Posted March 10, 2023 On 3/6/2023 at 11:08 AM, Ivan Holbi said: Regarding "HOWEVER, the customer who confirmed the order receives nothing (i.e.: no email, no confirmation)." most likely the e-mail template is not assigned to the corresponding order status. We cannot confirm it since the login details you provided us with do not have enough rights for us to see the order statuses in your admin area. Regarding "Something similar happens when sending a gift voucher: the sent voucher correctly appears under "Gift vouchers sent" after a green "voucher sent" notice is displayed, however, the customer receives nothing in his inbox." could you please confirm with the customer if the spam folder was checked? Dear Ivan, these: are my email template settings for order status (confirmation of a new order in this case), hence I believe evertyhing has been set up correctly? With the above settings, still no email is being received by our customer after a new order confirmation. Likewise, the "new password sent" message is displayed onscreen with the information that an email with a new password has been sent, however, no password reset email is once again received by our customer. Last but not least, the spambox/junkbox folder (customer in this case uses a hotmail.com email account) was checked and nothing has been found at all. Thank you Mendoh P.S.: all the "Admin new device login" email messages get sent out after admin logs in, however, they still land into spambox despite SMTP authentication is configured and I am running the latest version. Do you happen to know why? Quote
mendoh Posted March 10, 2023 Author Posted March 10, 2023 On 3/6/2023 at 11:08 AM, Ivan Holbi said: Regarding "HOWEVER, the customer who confirmed the order receives nothing (i.e.: no email, no confirmation) Further to my previous message and truly odd enough, I can confirm that not even the store owner email's address received an order confirmation email this time (as opposed to what happened previously)... Quote
mendoh Posted March 10, 2023 Author Posted March 10, 2023 8 hours ago, mendoh said: Further to my previous message and truly odd enough, I can confirm that not even the store owner email's address received an order confirmation email this time (as opposed to what happened previously)... I stand corrected: the store owner's email has actually received an order confirmation email, although delayed... Quote
pandrei Posted March 10, 2023 Posted March 10, 2023 @mendoh, I recommend that you install Email History Report - you will be able to see all the emails that have been generated and sent. Also please replace the file lib/common/helpers/Mail.php with the attached one. The updated file writes a log message if there was an error while sending email. Mail.php Quote
mendoh Posted March 10, 2023 Author Posted March 10, 2023 8 hours ago, pandrei said: I recommend that you install Email History Report Andrei, thanks. Where am I supposed to check the log messages which I may get from the new mail.php file? I have followed your suggestions one by one and the results are as follows: email history report app: this one appears to work and I can see all the sent emails; sent a test gift voucher: it gets reported by email history, however, nothing is received by the customer in his hotmail.com inbox; tried once again a test order confirmation: it gets reported by email history, however, nothing is received by the customer in his hotmail.com inbox. The issue lingers on... Quote
pandrei Posted March 11, 2023 Posted March 11, 2023 16 hours ago, mendoh said: Where am I supposed to check the log messages which I may get from the new mail.php file? You can find the email errors in the log files for the frontend and the backend: app.log or list.log To view this files you can use Settings -> Tools -> Event log viewer. If you send the email notifications from the backend - look for the errors in the backend log files. Otherwise look them in the frontend log files. We understand that this is not very user friendly. In the next version the email status and the error will be accessible from the Email History report. Quote
mendoh Posted March 12, 2023 Author Posted March 12, 2023 18 hours ago, pandrei said: You can find the email errors in the log files for the frontend and the backend: app.log or list.log Hello Andrei, thanks for your fast reply. Checked both the app.log and list.log list and I could not find any errors that trace back to an email sending issue...yet the email messages sent by OSCv4 (either a gift voucher or an order confirmation) are still not being received by the intended customer. Any ideas on where the culprit may be? Thank you Quote
pandrei Posted March 13, 2023 Posted March 13, 2023 22 hours ago, mendoh said: Checked both the app.log and list.log list and I could not find any errors that trace back to an email sending issue...yet the email messages sent by OSCv4 (either a gift voucher or an order confirmation) are still not being received by the intended customer. Any ideas on where the culprit may be? Hello Mendoh, Did you check the frontend and backend logs? If the logs do not contain the email errors it means the email sends fine. Please note that the smtp server may block your email (for example if the From field match the spam conditions) Quote
mendoh Posted March 16, 2023 Author Posted March 16, 2023 On 3/13/2023 at 11:36 AM, pandrei said: Did you check the frontend and backend logs? Hello Andrei, I have checked the app.log and list.log backend files again and I have not found any error which appears to be related to email sending. Instead, the app.log and list.log frontend files revealed the following error: Swift_TransportException: Connection could not be established with host smtp.yoursite.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: HOWEVER, the above error shows a log date which is prior to the installation of your latest upgrade which brings the smtp fix. Host said that as long as the proper smtp authentication policy is adopted by the e-commerce engine their server should not block emails. I still have the issue... Quote
pandrei Posted March 16, 2023 Posted March 16, 2023 If there are no errors in the log files, then the mail sending session is successful. I have two suggestions: 1) Check that the E-Mail address field for your sales channel contains a valid address for sending emails from your smtp server. 2) Try to change E-Mail Linefeeds field into E-Mail options settings to CRLF Quote
mendoh Posted March 16, 2023 Author Posted March 16, 2023 7 hours ago, pandrei said: I have two suggestions: Andrei, thanks for your reply. I have followed your instructions carefully and these are the results: e-mail address fields of our active sales channels are all populated, including the "E-mail from:" field order confirmation email is sent and gets received almost immediately on the inbox of the email address specified in the active sales channels; the hotmail.com email address of the customer who confirmed an order still receives NOTHING; the hotmail.com email address of the customer who confirmed an order is also present in the "Send Extra Order Emails To" field, but once again received NOTHING; the email history logs correctly show the sent order email confirmation to the customer's hotmail.com address, which is correct at the time when the confirmation email was sent, the frontend/app.log reported the following error: PDOException: SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: 'now()' in /home/yoursite/yoursite.com/onlineshop/lib/vendor/yiisoft/yii2/db/Command.php:1302 at the time when the confirmation email was sent, the frontend/list.log reported the following error: PDOException: SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: 'now()' in /home/yoursite/yoursite.com/onlineshop/lib/vendor/yiisoft/yii2/db/Command.php:1302 no errors are being reported in the backend error log. The issue still persists... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.