Greetings All,
I am writing a program that will enable my users to email from within their liveCode app without having to open an email application.
In researching this, I ran onto Sarah's SMTP Library which allows me to do what I want with one problem.
I can send a regular email, but when I attempt to add any kind of attachment, I get an error message.
Sarah is no longer supporting this library, but I was hoping someone else might be familiar with it and be able to offer some help.
Thanks,
John Miller
Sarah's SMTP Library Problems
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Sarah's SMTP Library Problems
Hi John,
Whenever you write that an error occurs, you should post the exact and complete text of the error. If you do this, maybe I can help. Posting the relevant code of the script that throws the error might help too.
Kind regards,
Mark
Whenever you write that an error occurs, you should post the exact and complete text of the error. If you do this, maybe I can help. Posting the relevant code of the script that throws the error might help too.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Sarah's SMTP Library Problems
Mark,
Oops! I should know better.
I was getting a "bad read" error message stating that a lone CR or LF had been encountered.
I am still wading through Sarah's code to see where these might be introduced to the body of my email,
but in the meantime, I added code that deletes all lone CR & LF characters. This had fixed my
problem.
Thanks for all the good work you do on the forum.
John
Oops! I should know better.
I was getting a "bad read" error message stating that a lone CR or LF had been encountered.
I am still wading through Sarah's code to see where these might be introduced to the body of my email,
but in the meantime, I added code that deletes all lone CR & LF characters. This had fixed my
problem.
Thanks for all the good work you do on the forum.
John
Re: Sarah's SMTP Library Problems
Thanks, John!
I don't know how you deleted the cr's and lf's but you might do something like
There are probably more ways to do this, e.g. with regex.
Kind regards,
Mark
I don't know how you deleted the cr's and lf's but you might do something like
Code: Select all
replace crlf with numToChar(14) in myBody // keep the correct ones
replace lf with cr in myBody // convert all lf's to cr
replace cr with crlf in myBody // convert all lone lf's and cr's to crlf
replace numToChar(14) with crlf in myBody // put back the originals
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode