Emailing from within a Servoy solution

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Emailing from within a Servoy solution

Postby Westy » Tue Dec 11, 2018 6:32 pm

We allow our customers to email out pdf forms as attachments from within our Servoy solutions. The emails are not mass mailings. They are sent to one recipient at a time, as needed. Some of the emails that are sent to providers like AOL, gmail and yahoo are rejected (probably for lack of email authentication).

How do other Servoy developers handle outgoing emails so that they will not be rejected? Is this usually done entirely from within the Servoy environment or by using an outside service. If an outside service, what are some examples?

Dean Westover
Choices Software, Inc.
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Emailing from within a Servoy solution

Postby Harjo » Thu Dec 13, 2018 2:07 pm

The SMTP protocol does not include any controls over the From and To fields in an e-mail. They can be whatever you like provided you have authority to send e-mails using the SMTP server.

So the short answer is nothing prevents anyone from using your domain in e-mails they send. Even normal users can put whatever e-mail address they like in their e-mail settings.

Spammers routinely use valid domain names as From addresses to avoid being blocked.

While you cannot stop someone from sending e-mails with your domain name, you can help e-mail servers around the world understand if e-mails sent from your domain name actually originated from you and are legitimate e-mails, so that any others can be discarded as spam.

SPF

One way is to use SPF. This is a record that goes into DNS and lets the Internet know what servers are permitted to send e-mails on behalf of your domain. It looks like this:

ourdomain.com.au. IN TXT “v=spf1 mx ip4:123.123.123.123 -all”
This says that the only valid sources of e-mail for ourdomain.com.au are the MX servers – the server defined as the recipient of e-mails for the domain, and another server at 123.123.123.123. E-mail from any other server should be considered spam.

Most e-mail servers will check for the presence of this DNS record and act accordingly.

DKIM

While SPF is easy to set up, DKIM takes a little more effort and should be implemented by your e-mail server administrator. If you send your e-mail via an ISP e-mail server, they will often have methods for quick setup of DKIM.

DKIM works similarly to SSL certificates. A public/private key pair is generated. The private key is known only to the e-mail server, and it will sign any outgoing e-mails.

The public key is published using DNS. So any server receiving e-mails marked as coming from your domain can check that the e-mail was signed by retrieving the public key and checking the signature in the e-mails. If no signature is present, or it is incorrect, the e-mail can be considered spam.

you can also choose to use ONE valid FROM address like: sender@myemailsendingdomain.com and set the reply-address to the address from your customers... so if someone is replying, the email goes to the right recipient.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Emailing from within a Servoy solution

Postby Westy » Mon Dec 17, 2018 9:00 pm

Harjo,

Thank you very much for your clear and helpful reply.

Dean Westover
Choices Software, Inc.
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 11 guests