Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Mailgun Sender plugin release
Started by Develephant Jul 31 2017 06:49 AM

3 replies to this topic
mail email mailgun
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

If you need to send some email from your Corona application, there is a basic Mailgun plugin available.

 

Mailgun allows up to 10,000 free emails a month, as well as some tracking features.

 

You can find the plugin here: https://marketplace.coronalabs.com/plugin/mailgun-sender

 

-dev


  • roaminggamer likes this

[TOPIC: post.html]
#2

nmichaud

[GLOBAL: userInfoPane.html]
nmichaud
  • Contributor

  • 492 posts
  • Corona SDK

Hi develephan,

We may have find a big bug on the mailgun plugin.

If in the bodyStr used for  "msg:html(bodyStr)" there is the usage of the '&' character the email body will be cut starting at that char, therefore the whole email is incomplete.

So in the following email body, you have 'Annick & Eric'. If we replace it by 'Annick and Eric' then we receive the whole email.

 


            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
             <head>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
              <title>Demystifying Email Design</title>
              <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
            </head>
            </html>
                    <body style="margin: 0; padding: 0;">
                <table width="100%" cellpadding="10" cellspacing="0" style="font-family: Avenir, Helvetica, sans-serif; box-sizing:border-box;  margin:0; padding:0; width: 100%;">
                    <tr>
                        <td style="background:#212121; color:#d8d8d8; padding:25px 0; font-size:19px; text-align:center;">
                            <img src="https://s3.amazonaws.com/ahjrok/memento_static/logos/mementopro128.png" style="box-sizing:border-box; max-width:100%;">
                        </td>
                    </tr>
            <tr><td>
        </br><p>Hello <b>Carole Lavallee</b>,</p><p>Your project was reviewed by your customer <b>Annick & Eric</b>.</p><p style="color:green">APPROVED PAGES</p><ul><li>Front cover</li><li>Back cover</li><li>Pages : 1,2</li><li>Pages : 3,4</li><li>Pages : 5,6</li><li>Pages : 7,8</li><li>Pages : 9,10</li><li>Pages : 13,14</li><li>Pages : 15,16</li><li>Pages : 17,18</li><li>Pages : 19,20</li><li>Pages : 21,22</li><li>Pages : 23,24</li><li>Pages : 25,26</li><li>Pages : 27,28</li><li>Pages : 29,30</li><li>Pages : 31,32</li><li>Pages : 33,34</li><li>Pages : 37,38</li><li>Pages : 39,40</li><li>Pages : 41,42</li><li>Pages : 43,44</li></ul>
<p style="color:red">NOT APPROVED PAGES</p><ul><li>Pages : 11,12<br><b>Comment:</b> remplace celle de droite par 0145</li><li>Pages : 35,36<br><b>Comment:</b> ote belle mere et tite fille ajout 0337

remplace la gauche par dsc0275</li><li>Pages : 45,46<br><b>Comment:</b> par 0612</li></ul>
<p>Please contact test@hotmail.com for clarification on any requested changes.
Thank you for using the Memento Share app.</p>

            </td>
            </tr>
            <tr>
                <td align="center" style="background:#212121; border-box; padding: 35px;">
                    <p style="box-sizing: border-box; line-height:1.5em; margin-top: 0; color: #FFFFFF; font-size: 12px; text-align: center;"=>Copyright Lumapix. This is an automated e-mail. Please do not reply directly.<br>
                    For Support assistance, please visit the <a href="http://mementoprosupport.lumapix.com/support/login">Memento Pro Support Portal</a></p>
                </td>
            </tr>
        </table>
        </body> 


[TOPIC: post.html]
#3

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

Sorry for the late reply.

 

The & will probably need to be url encoded. I'll take a look at the code.

 

Thanks for reporting.

 

-dev



[TOPIC: post.html]
#4

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

If you wanted to test that theory I mentioned above, you can try running the message part your adding (not the whole bodyStr) using:

msg_part = string.gsub(msg_part, "&", "&amp;")

-dev




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: mail, email, mailgun