Hi Dave,

Yes, you can include attachments in an e-mail.

The pData parameter to the tsNetSmtp* commands is the raw e-mail message that you wish to send, complete with e-mail headers.

So to send an attachment, you need to build the e-mail as a multi-part MIME message.

I have just updated the LCMail stack (thanks to Neil and Matthias for that stack) to add an attachment when you click the "send" button.

It is at the same URL as before:

https://downloads.techstrategies.com.au/tsnet/LCMail.livecode

Cheers,

Charles


On 16/09/2016 8:57 PM, Dave Kilroy wrote:
Thanks for your help with this Charles and others

Yesterday I got the same advice from HostM about using TLS  - "smtp://domain:port” 
and not "scheme://host:port/path: as it is in the dictionary

I’m so impressed with your external, it’s so fast and even fussy domains such 
as nhs.net email accounts accept emails sent by it without objection :)

I have a question to ask though, is it possible to include an attachment with 
the email?

Dave




Hi Matthias,

On 16/09/2016 8:46 AM, Matthias Rebbe wrote:
And here´s a simple script



put TRUE into pSettings["use_ssl"]

-- Note: when setting use_ssl to TRUE, then you have to use smtps:// --


That is not quite correct.

Secure SMTP comes in two flavours, SSL and TLS.

If you are using SMTP over SSL, then you just need a URL starting with
"smtps://" and you do not need the "use_ssl" setting.
If you are using SMTP over TLS, then you need a URL that looks like
"smtp://mail.mydomain.com:587" and you must use the "use_ssl" setting to
invoke TLS.

I have taken the liberty to update Neil's LCMail stack with a few radio
buttons, so that it generates the URL and adds the "use_ssl" setting
only when appropriate.  You can download it here:

https://downloads.techstrategies.com.au/tsnet/LCMail.livecode 
<https://downloads.techstrategies.com.au/tsnet/LCMail.livecode>

As an aside, a similar concept applies when using FTPS in implicit or
explicit mode:

If you are using FTPS in implicit mode, then you just need a URL
starting with "ftps://" and you do not need the "use_ssl" setting.
If you are using FTPS in explicit mode, then you need a URL that starts
with "ftp://"; and you must use the "use_ssl" setting to invoke TLS.

Regards,

Charles



answer pResponseHeaders &return &tResult

end mouseup


HTH,

Matthias

Am 15.09.2016 um 23:54 schrieb Matthias Rebbe <[hidden email] 
<http://runtime-revolution.278305.n4.nabble.com/user/SendEmail.jtp?type=node&node=4708493&i=0>>:

Hi Mark,

i just tried it with the stack from Neil Roger which is available here
http://techsupport.on-rev.com/LCMail.zip <http://techsupport.on-rev.com/LCMail.zip> 
<http://techsupport.on-rev.com/LCMail.zip <http://techsupport.on-rev.com/LCMail.zip>>
or an extended version, which includes also some FTP examples,here
https://dl.dropbox.com/s/q4oec8uu3pcdgfj/index.html 
<https://dl.dropbox.com/s/q4oec8uu3pcdgfj/index.html> 
<https://dl.dropbox.com/s/q4oec8uu3pcdgfj/index.html 
<https://dl.dropbox.com/s/q4oec8uu3pcdgfj/index.html>>

Are you referring to that sample stack?

I just tried it. I have no problems using it to send an email through one of my 
 HostM email accounts to my iCloud email address.


Matthias



Am 15.09.2016 um 23:29 schrieb Mark Clark <[hidden email] 
<http://runtime-revolution.278305.n4.nabble.com/user/SendEmail.jtp?type=node&node=4708493&i=1>>:

I am looking to replace sending emails via shell to one using the tsNet 
library. At first I had thought there was a var for the smtp port, but that’s 
just a server address setting (whoops).
I am using hostM on this project and I’m trying to configure through their mail 
host- I have the proper settings for outgoing mail server (587), mail username 
(which is just the address for the account), and password. The error message I 
get back is (56) Failure when receiving data from peer/returned from server.  
I’m just slogging through the tsNet Sample Sync Stack to speed things up since 
sending the email should be trivial compared to the data enclosed in the actual 
message. But, sometimes that’s how it goes:) Other than the Dictionary and this 
sample stack does anyone have a pointer to a simple example using this external 
with a hosted mail service?

thx,
mark c
_______________________________________________
use-livecode mailing list
[hidden email] 
<http://runtime-revolution.278305.n4.nabble.com/user/SendEmail.jtp?type=node&node=4708493&i=2>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode 
<http://lists.runrev.com/mailman/listinfo/use-livecode>
_______________________________________________
use-livecode mailing list
[hidden email] 
<http://runtime-revolution.278305.n4.nabble.com/user/SendEmail.jtp?type=node&node=4708493&i=3>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode 
<http://lists.runrev.com/mailman/listinfo/use-livecode>
_______________________________________________
use-livecode mailing list
[hidden email] 
<http://runtime-revolution.278305.n4.nabble.com/user/SendEmail.jtp?type=node&node=4708493&i=4>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode 
<http://lists.runrev.com/mailman/listinfo/use-livecode>
... [show rest of quote <>]
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to