BBC BASIC for Windows
« SMTP »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:55pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: SMTP  (Read 1422 times)
Nanne
New Member
Image


member is offline

Avatar




PM


Posts: 9
xx Re: SMTP
« Reply #5 on: Oct 23rd, 2012, 10:44pm »

Is it possible to send a file using the socklib library. And If so how I have to do that?

I tried:

IF FN_writelinesocket(skt%, "Attach: "+"test.txt")

But it didn't work.

Nanne
« Last Edit: Oct 23rd, 2012, 10:45pm by Nanne » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: SMTP
« Reply #6 on: Oct 24th, 2012, 08:20am »

on Oct 23rd, 2012, 10:44pm, Nanne wrote:
Is it possible to send a file using the socklib library.

I assume from the context that you are referring to attaching a file to an email (rather than uploading it to an FTP server, for example). Is that right?

If an FTP upload is acceptable then this article tells you how to do it: http://bb4w.wikispaces.com/Uploading+files+to+an+FTP+server

Richard.
User IP Logged

Nanne
New Member
Image


member is offline

Avatar




PM


Posts: 9
xx 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 sad 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

Nanne
New Member
Image


member is offline

Avatar




PM


Posts: 9
xx 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 smiley

Nanne
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls