Sending An EMail From Corona

@sjhershnyc As just a suggestion, since you are working with documents and the need to make sure those are consistently delivered to your customers, as well as needing the ability to track that transaction, an app/server based architecture will most likely offer you many benefits.

Cheers,

Chris

chris/rob - thanks for the suggestions/comments.

i’m sending invoices and wanted to know if the email was actually sent; initially i assumed that if it WAS sent, then the items would be considered final and invoiced.

but what if the user is simply testing - and just because the email was sent may not really mean the items are really invoiced.

So I threw up a “landing” screen to ask if the User actually wanted the items (which were “sent”) fully recorded as Invoiced or to ignore the assignment to an Invoice.

It’s not hard in my app to back out an invoice - but now having the User make a conscious decision as to what to do will insure they fully understand the implications.

chris, you’re idea is good but, at this point, a bit too aggressive for where I am with this app and what it can do. I’ve got a web-based server ready for your suggestion - but will implement if i produce the “pro” version.

seth

Well good luck either way. :slight_smile:

Always happy to answer questions if needed.

Cheers,

Chris

You could consider looking at running your own email sender.  You can use a web hosting company, write a PHP script to send the email using the hosting provider’s email system. Then you could manage it yourself.

Rob

Is there a way to add an event listener to the native.showPopup(“mail”, options) to indicate if a message has been sent or at least, whether the popup has been closed? I have tried to add a listener = onComplete in the options table, but it does not work.

Any suggestions? Thanks

There isn’t a way to set a listener for mail.

Rob

rob - i read your last post here that said an eventListener() was not possible with native.showPopup(“mail”).

does this literally mean I CANNOT tell if the email was sent or not?

i’m sending an Invoice with an email and if the User cancels, I do not want to update billing records that they were ‘invoiced’; otherwise, if the email is sent i want to flag the records as invoiced.

is there ANY way to tell if an email was sent or cancelled?

Or should I simply throw up a modal dialog and ask the User if they want to update the billing records (whether they cancel or send the email)?

thanks.

seth

anil - try using string.char(10) to generate a RETURN/NEW LINE within a text string.

seth

There is no way to know if the user canceled or completed the form.

Rob

@sjhershnyc As just a suggestion, since you are working with documents and the need to make sure those are consistently delivered to your customers, as well as needing the ability to track that transaction, an app/server based architecture will most likely offer you many benefits.

Cheers,

Chris

chris/rob - thanks for the suggestions/comments.

i’m sending invoices and wanted to know if the email was actually sent; initially i assumed that if it WAS sent, then the items would be considered final and invoiced.

but what if the user is simply testing - and just because the email was sent may not really mean the items are really invoiced.

So I threw up a “landing” screen to ask if the User actually wanted the items (which were “sent”) fully recorded as Invoiced or to ignore the assignment to an Invoice.

It’s not hard in my app to back out an invoice - but now having the User make a conscious decision as to what to do will insure they fully understand the implications.

chris, you’re idea is good but, at this point, a bit too aggressive for where I am with this app and what it can do. I’ve got a web-based server ready for your suggestion - but will implement if i produce the “pro” version.

seth

Well good luck either way. :slight_smile:

Always happy to answer questions if needed.

Cheers,

Chris

You could consider looking at running your own email sender.  You can use a web hosting company, write a PHP script to send the email using the hosting provider’s email system. Then you could manage it yourself.

Rob