How can I check if mailer works correctly or not

Hi,

I’m trying to send an activation email to new users though, email has not been sent and I don’t know how to check if it works correctly or not. please someone let me know how to solve this.

http://174.138.46.199/signup/

Have you checked whether your STMP server works without a Mail posted from Wappler?
Sometimes the provider are blocking port 25 for standard outgoing mails.
If you run your mailserver locally there could also be a firewall, blocking the outgoing ports…
Just check first if you can send a mail out of a standard mailclient or take a tool (for locally ms exchange etc., also works for linux but just on locally hosted servers) to check the outgoing ports like telnet.


If you have a platform hosted SMTP you normally can check it on the admin pages…

If there is everything o.k, then you’ve anything wrong in your server action :sweat_smile:
Hope this will help you.

Thank you so much for your advice, I could not find an error from your link.

But I came up with the other question regarding this.

I’m using Docker though, do I need some setting for SMTP server on Docker?

The SMTP should be set up in the Mail Setup in Action Steps
Do you have access to the mail reports on your server, normally you can check if they have been sent.

I had an issue a while back, that the website was sending the mail, but the server was classing them as spam due to security rules, so they were accepted from the site but not sent by the server.

Thank you for sharing your comment.

Mailer in Action steps has two options, SMTP setting and server default setting. Should I set values with SMTP setting anyway? And I don’t know about mail reports on the server…Is it available even if I do this on localhost and DigitalOcean with IP address? (but I have email which is functioning)

I always use SMTP details, not sure if thats the best way. But at least I know the email has to be authenticated before it sends.

Of course you should! These are the settings of your SMTP server, it won’t work until you enter them.

I’m still trying to setup SMTP on local’s docker.

スクリーンショット 2020-07-13 19.11.33

But I can’t change smtp_port from 25 to 1025 even after changing it in “php.ini.default” of docker’s container for web.

I don’t know due to this or not, I still get 500 error with this mailer properties.

I’ve searched hints in this forum though, could not find the solution.

Thanks,

I haven’t solved this issue yet.

So I would like to continue to ask question.

I did https://testconnectivity.microsoft.com/tests/O365OutboundSmtp/input under the different env.
and I got this error.
スクリーンショット 2020-10-06 14.11.24

where should I start from?

thanks,

Looks like this is an Office 365 mailbox you are trying to send email from.
Make sure the SMTP = Outgoing Email settings are as per your mailbox settings.
You can test these using say Thunderbird or mobile app like Gmail - add a new account, set the IMAP/POP and SMTP settings as per your Office mailbox and see if you can send emails there.

I had configured an Office 365 mailbox few months ago, and I found that there are different port settings than default ones used in general. Apart from that, I did not have any issues.

In case you still can’t send outbound emails, I would suggest to contact Office support.

oh maybe I should not use this tool?
because I am not trying to send an email from Office 365 mailbox.

by the way, I am using docker/digitalocean/mxroute right now. And I don’t know where I should start from, to solve this one.

just email sending/receiving works fine on mxroute now. I think it is the port configuration problems.

You misunderstood me.
Emails are ALWAYS send from the mailbox you configure.

Wappler is not a native mailbox. You have to supply settings of another mailbox, which is then used to send and receive emails. In this case just sending, hence SMTP.

You have to find out what the SMTP settings of whatever mailbox server you are trying to use are, then set those here in Wappler.

I am not aware of Docker requiring any special configuration.
If you are trying to use Digital Ocean’s mailbox server (i’m not aware of such a thing either), then input those settings in the SMTP fields in Wappler.

For example: We use shared hosting email server via cPanel in some places. So in cPanel, we get this settings to configure mailbox in 3rd party tools - like Thunderbird, Outlook, Gmail or Wappler etc.

image

You just need to find such settings for your server and use them in Wappler.

1 Like

thanks, I’m using mxroute for the part you mentioned.

Now I think it is docker/digitalocean topic. The provided port number doesn’t work, I need to find the other way to do the configuration…hope someone knows and help me about this.

All you should need are the settings that were sent in the email from mxroute with the SMTP settings/port numbers. You’ll also need the email account and password that you’ve set up with mxroute.

If you just use those (I’m also with mxroute) it should work fine.

Set up the Mailer in Wappler, then add a send mail step sending a dummy email to another email address (like your Gmail one)

1 Like

Thanks,

my setting is like below.

スクリーンショット 2020-10-06 16.21.51

But I still get 500 error…

What is the exact error message you see for this 500 error?

the error says this:

message: "Connection "connection1" not found." trace: "#0 /var/www/html/dmxConnectLib/lib/validator/Validator.php(112): lib\validator\rules\db->exists('info@xxx.com', Object(stdClass))↵#1 /var/www/html/dmxConnectLib/lib/validator/Validator.php(26): lib\validator\Validator->validateRule('db:exists', 'info@xxx.com', Object(stdClass))↵#2 /var/www/html/dmxConnectLib/modules/validator.php(16): lib\validator\Validator->validate(Array)↵#3 /var/www/html/dmxConnectLib/lib/App.php(173): modules\validator->validate(Object(stdClass), 'validate1')↵#4 /var/www/html/dmxConnectLib/lib/App.php(137): lib\App->execSteps(Object(stdClass))↵#5 /var/www/html/dmxConnectLib/lib/App.php(107): lib\App->execSteps(Array)↵#6 /var/www/html/dmxConnectLib/lib/App.php(72): lib\App->exec(Object(stdClass))↵#7 /var/www/html/dmxConnect/api/Passwords/request_new.php(8): lib\App->define(Object(stdClass))↵#8 {main}"

Well the error points to something totally different than the mailer.
It says some connection called connection1 selected in some step (seems like validator) does not exist.

Perhaps just create a new test Server Connect action file with JUST the mailer and send mail steps.

1 Like

Now error changed (connection1 was wrong, I changed the connection)

code: 0
file: "/var/www/html/dmxConnectLib/lib/mail/Smtp.php"
line: 100
message: "fsockopen(): unable to connect to ssl://mail.bestinx.io:465 (Connection refused)"
trace: "#0 [internal function]: exception_error_handler(2, 'fsockopen(): un...', '/var/www/html/d...', 100, Array)↵#1 /var/www/html/dmxConnectLib/lib/mail/Smtp.php(100): fsockopen('ssl://mail.best...', 465, 111, 'Connection refu...', 5)↵#2 /var/www/html/dmxConnectLib/lib/mail/HtmlMimeMail.php(718): lib\mail\Smtp->connect()↵#3 /var/www/html/dmxConnectLib/lib/mail/Mailer.php(114): lib\mail\HtmlMimeMail->send(Array, 'smtp')↵#4 /var/www/html/dmxConnectLib/modules/mail.php(64): lib\mail\Mailer->send(Object(stdClass))↵#5 /var/www/html/dmxConnectLib/lib/App.php(173): modules\mail->send(Object(stdClass), '')↵#6 /var/www/html/dmxConnectLib/lib/App.php(137): lib\App->execSteps(Object(stdClass))↵#7 /var/www/html/dmxConnectLib/lib/App.php(107): lib\App->execSteps(Array)↵#8 /var/www/html/dmxConnectLib/lib/App.php(72): lib\App->exec(Object(stdClass))↵#9 /var/www/html/dmxConnect/api/Passwords/request_new.php(8): lib\App->define(Object(stdClass))↵#10 {main}"```