Author |
Topic: SMTP (Read 1418 times) |
|
Nanne
New Member
member is offline


Posts: 9
|
 |
Re: SMTP
« Reply #7 on: Oct 24th, 2012, 09:20am » |
|
Hi Richard,
Sorry, I was not clear in my question.
I want to attach a file (PDF) with my email-message.
I have read the documentation about FTP but my users (the receivers) can't use FTP So I have to attach a file to a message.
So, my question is: Is it possible to attach af file with using the socklib library?
Thank you,
Nanne
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: SMTP
« Reply #8 on: Oct 24th, 2012, 09:43am » |
|
on Oct 24th, 2012, 09:20am, Nanne wrote:| Is it possible to attach af file with using the socklib library? |
|
Certainly it is "possible", but I'm not aware of anybody having done it before. You would need to create a multipart MIME email including the attachment, suitably encoded (e.g. as 'base64'). There is some useful information on what is needed here:
http://www.codeguru.com/cpp/i-n/internet/email/article.php/c3405/EMail-File-Attachments-Using-MIME.htm
At a quick glance it looks quite easy. Let us know how you get on (and ideally write a Wiki article - or even a BB4W library - for the benefit of others).
Richard.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: SMTP
« Reply #9 on: Oct 24th, 2012, 5:30pm » |
|
on Oct 24th, 2012, 09:43am, Richard Russell wrote:| At a quick glance it looks quite easy. |
|
In fact so easy I couldn't think of a good reason not to write it myself - so I did:
http://bb4w.wikispaces.com/Sending+an+email+with+attachments
It hasn't been extensively tested but appears to work. Let me know if you have any problems with it.
Richard.
|
|
Logged
|
|
|
|
Nanne
New Member
member is offline


Posts: 9
|
 |
Re: SMTP
« Reply #10 on: Oct 24th, 2012, 11:12pm » |
|
Hi Richard,
Thank you for your work!
I'll try it this week and let you know if I have problems with it. When it works fine, which I assume, I let you know that too 
Nanne
|
|
Logged
|
|
|
|
|