Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to <strong>send</strong> emails with Erlang, you should take a look at the transactional email service <a href="http://amail.io" rel="nofollow">AlphaMail</a>.</p> <p>Here is an example of how to send an email with the <a href="https://github.com/comfirm/alphamail-erlang-client" rel="nofollow">AlphaMail module for Erlang</a>:</p> <pre><code>Service = alphamail:email_service("YOUR-ACCOUNT-API-TOKEN-HERE"). Payload = alphamail:message_payload( 2, % Project id alphamail:email_contact(&lt;&lt;"Sender Name"&gt;&gt;, &lt;&lt;"from@example.com"&gt;&gt;), % Sender alphamail:email_contact(&lt;&lt;"Joe E. Receiver"&gt;&gt;, &lt;&lt;"to@example.org"&gt;&gt;, 1234), % Receiver (with receiver id) % Any JSON serializable payload data [ {"userId", 1234}, {"name", {struct, [ {"first", "Joe"}, {"last", "E. Receiver"}, ]}}, {"dateOfBirth", 1989} ] ). alphamail:queue(Service, Payload). </code></pre> <p>And as your HTML/<a href="http://app.amail.io/#/docs/comlang/" rel="nofollow">Comlang</a> template:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;b&gt;Name:&lt;/b&gt; &lt;# payload.name.first " " payload.name.last #&gt;&lt;br&gt; &lt;b&gt;Date of Birth:&lt;/b&gt; &lt;# payload.dateOfBirth #&gt;&lt;br&gt; &lt;# if (payload.userId != null) { #&gt; &lt;a href="/sign-up"&gt;Sign Up Free!&lt;/a&gt; &lt;# } else { #&gt; &lt;a href="/login?id=&lt;# payload.userId #&gt;"&gt;Sign In&lt;/a&gt; &lt;# } #&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>Disclosure: I'm one of the developers behind AlphaMail</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload