I'm working on a codename one application and want to send an automated email. I downloaded the cni1lib, SendGrid, and implemented it. The syntax for sending an email is below but the subject is getting mixed up with the fromEmail and the messages are going straight to spam.

I've looked online but cannot find anything useful.

How it should look:

SendGrid s = SendGrid.create(YOUR_SEND_GRID_API_TOKEN);
s.sendSync(toEmail, fromEmail, subject, body);

Does anyone know how to get the messages out of spam and fix the subject issue?

1 Answers

0
Shai Almog On

The subject issue is a bug which will be resolved in the coming update of the lib. It should be available in the extension manager in a few hours.

The fact that emails go to spam has a lot to do with SengGrid itself. You need to check out the documents on their site about getting authority for sending. That means associating a domain with your emails via the correct headers. It also might mean changing the server IP address and possibly setting a permanent IP address.