Sending emails

16 views
Skip to first unread message

carnel yve

unread,
Dec 4, 2023, 6:55:52 PM12/4/23
to Zotonic developers
I have been slowly learning how zotonic works and couldn't get email to work locally.
My emails are bouncing. I am sure there is a trick for make mail servers to accept emails sent from zotonic. Just couldn't find. I thought about adding the " email_from" configuration to the zotonic_site.config, but it didn't change anything.
Any idea how to get email sending work?
Thanks.

Marc Worrell

unread,
Dec 5, 2023, 3:13:49 AM12/5/23
to zotonic-d...@googlegroups.com
Hi,

In the zotonic.config there are these settings:


%%% SMTP outbound relay configuration.
%%% Zotonic will send email itself, enable a relay if outgoing port 25 traffic is blocked.
   %% {smtp_relay, false},
   %% {smtp_host, "localhost"},
   %% {smtp_port, 25},
   %% {smtp_ssl, false},
   %% {smtp_username, undefined},
   %% {smtp_password, undefined},

%%% SMTP send all email into a blackhole, ideal for testing large mailings
   %% {smtp_is_blackhole, false},

%%% SMTP extra relay options:
%%% some picky/buggy/misconfigured relays might need one of these to be enabled.
   %% {smtp_no_mx_lookups, false},
   %% {smtp_verp_as_from, false},
   %% {smtp_bounce_email_override, "m...@example.com"},

%%% SMTP mail queue.
%%% How long to keep sent messages in the mail queue (in minutes).
%%% Leave it long enough to receive any bounce message.
   %% {smtp_delete_sent_after, 240},

%%% SMTP debug options.
%%% Send a copy of outgoing mail to this address:
   %% {smtp_bcc, "bcc@localhost"},
%%% Send all mail to this address instead of the original recipient:
   %% {email_override, "override@localhost"},

I have them on my dev machine as follows (with some redacted secrets):


%%% SMTP outbound relay configuration.
%{smtp_is_blackhole, true},
{smtp_relay,true},
{smtp_host,”smtp.myisp.nl"},
{smtp_port,587},
{smtp_username, “m.wo...@myisp.nl"},
{smtp_password, “…."},
   %% {smtp_ssl, true},

%%% SMTP extra relay options:
%%% some picky/buggy/misconfigured relays might need one of these to be enabled.
{smtp_no_mx_lookups,true},
{smtp_verp_as_from,true},
{smtp_bounce_email_override,"ma...@worrell.nl"},

%%% SMTP mail queue.
%%% How long to keep sent messages in the mail queue (in minutes).
%%% Leave it long enough to receive any bounce message.
   %% {smtp_delete_sent_after, 240},

%%% SMTP debug options.
%%% Send a copy of outgoing mail to this address:
   %% {smtp_bcc, "bcc@localhost"},
%%% Send all mail to this address instead of the original recipient:
   %% {email_override, "override@localhost"},
{email_override, "ma...@worrell.nl"},



--

---
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/e9c42185-51a8-4595-93f9-edd3eb4a7053n%40googlegroups.com.

carnel yve

unread,
Dec 5, 2023, 3:29:18 AM12/5/23
to Zotonic developers
Zotonic is awesome!
Reply all
Reply to author
Forward
0 new messages