Page 1 of 2

SMTP settings

Posted: Sat Mar 18, 2023 9:09 am
by radhavallabh
Hi dear;
Need configure SMTP settings for mail;
Can you help where can I put these settings in Phoenix , as my host can send mails only using that...

Thank you in advance;
Regds./
radhavallabh

Re: SMTP settings

Posted: Sat Mar 18, 2023 10:26 am
by ecartz
If you want to use Authenticated SMTP, you would have to install an add-on. No one has bundled a free one into the add-ons area, so you would probably have to pay for one from a certified developer.

Re: SMTP settings

Posted: Sat Mar 18, 2023 12:41 pm
by radhavallabh
Thank you dear I managed to add SMTP to my emails-
But one issue still persists-
I am getting the emails with all build params displayed and the whole content written twice in it

Like below

Code: Select all

--=_26e1410aab628a3ad5d52a6fcf91cb86
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

xx logged in

Date/Time: 2023-03-16T09:17:11+00:00

IP: 182..xx.x.xx

Browser: Mozilla/5.0 (Windows NT 0.0; Win64; x64; rv:109.0) Gecko/00000 Firefox/111.0

If you have not logged into your administrative account for a long time, and you think this access may be unauthorised, please login and change your password ASAP.
--=_26e1410aab628a3ad5d52a6fcf91cb86
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

xx logged in<br><br>Date/Time: 2023-03-16T09:17:11+00:00<br><br>IP: 182=
.x.x.x<br><br>Browser: Mozilla/5.0 (Windows NT 0.0; Win64; x64; rv:10=
9.0) Gecko/0000000 Firefox/111.0<br><br>If you have not logged into your a= dministrative account for a long time, and you think this access may be una= uthorised, please login and change your password ASAP.
--=_26e1410aab628a3ad5d52a6fcf91cb86--
Can you help me fix and understand why is this happening????

Your valuable help is deeply appreciated dear;
Thank you in advance;
Very Warm Regds./
radhavallabh

Re: SMTP settings

Posted: Sat Mar 18, 2023 4:02 pm
by radhavallabh
Forgot to mention I use PHP 8.0 with this cart on 1.0.8.20 dear...

Re: SMTP settings

Posted: Sat Mar 18, 2023 4:28 pm
by ecartz
radhavallabh wrote: Sat Mar 18, 2023 12:41 pm I managed to add SMTP to my emails-
How?

The emails that you show are what you get when you have multiple MIME sections. For example, if you use HTML emails. This may mean that something above that is malformed and your email client is trying to treat a multipart email as if it were plain text.

Re: SMTP settings

Posted: Sun Mar 19, 2023 4:41 am
by radhavallabh
I used PHPMailer dear, Downloaded and added class files to the classes folder. Created a override system file of email.php ;
In email.php I gave all the SMTP setting for phpmailer and it worked.

For multipart email treated as text---Oh so does it mean the headers are not being passed properly dear in PHP-8.0??

Your valuable help is deeply appreciated dear;
Thank you in advance;
Very warm Regds./
radhavallabh

Re: SMTP settings

Posted: Sun Mar 19, 2023 4:50 am
by ecartz
It means that either you aren't calling PHPMailer correctly or conceivably that your email client doesn't know how to handle multipart emails. Because PHPMailer should be the thing that creates the multipart email. Phoenix has code to create multipart emails but you shouldn't be using it with PHPMailer. The override class should simply pass all that to PHPMailer to assemble.

Re: SMTP settings

Posted: Sun Mar 19, 2023 6:15 am
by radhavallabh
I tried one thing dear;
The Override class is simply passing the generated variables to PHPMailer.
Switching to 7.4 PHP version fixes the issue. But on PHP 8.0 issues again rises.
Can you shed some light on what may be causing it, SO could work in that direction...
Thank you in advance;
Very Warm Regds./
radhavallabh

Re: SMTP settings

Posted: Sun Mar 19, 2023 1:41 pm
by ecartz
If it works in 7.4 and not in 8.0, presumably it is something in https://www.php.net/manual/en/migration ... atible.php

Perhaps compare what it passes to PHPMailer in 7.4 versus 8.0. If it calls PHPMailer the same in both, then the problem is likely in PHPMailer. If it is different, then that may be something that I can help fix if you tell me what is different. I may need a copy of the override class.

If the override class that calls PHPMailer comes from one of the certified developers, then it might be better to have the certified developer contact me directly for help (if needed). If from a non-certified developer, then perhaps the developer should talk to admin about being certified. Or you might switch to one of the certified developers. All of the certified developers have access to an example override class that I know worked under PHP 8 under the configuration used by one site. It is possible that there's something about your configuration that is different. This kind of issue is exactly why I did not publish it myself but would prefer that a certified developer do so.

Anyway, my point is that I can't tell you what might be wrong in your site with your custom code. That's something that you have to debug yourself. Either personally or by dealing with a certified developer. Once you've done that, I might be able to help you change the Phoenix side. Or you might find that the problem is inside PHPMailer or the override class or something else.

Re: SMTP settings

Posted: Tue Mar 21, 2023 9:13 am
by radhavallabh
Hi dear;
It fixed by changing linefeeds to CRLF
Now a strange development with smtp phpmailer.
All Emails are sent out easily by admin side.

But when a email needs to be sent out on catalog side via Order Checkout Notifications. It gives a 504 gateway Timout error.
Also I tried using ask_a_question module to test catalog side again 504 gateway timeout error.
No error in php error log.

I am not able to understand what is the difference on both sides due to which the timeout error is triggered dear.

Please can you help shed light and fix on this;
Thank you very much in advance
Very Warm Regds./
radhavallabh