Discussion:
SMTP questions
(too old to reply)
Robert Wolfe
2009-01-07 17:32:08 UTC
Permalink
Good afternoon all.

I am working on a custom SMTP mailer for a much bigger project that I am
working on in PB/CC. My problem is that the SMTP transfer goes ok, but
the resulting email that gets sent gets sent with the body of the
message between the X-Header information (if any) and the date
information. I am using the code sample for SMTP from the PB/CC help.
Auric__
2009-01-07 18:42:23 UTC
Permalink
Post by Robert Wolfe
Good afternoon all.
I am working on a custom SMTP mailer for a much bigger project that I am
working on in PB/CC. My problem is that the SMTP transfer goes ok, but
the resulting email that gets sent gets sent with the body of the
message between the X-Header information (if any) and the date
information. I am using the code sample for SMTP from the PB/CC help.
Did you make any changes to the sample code (aside from obvious things like
server, email address, etc.)?

The few network programs I've written were all written from scratch, in part
because there aren't any Usenet samples in the help file. I had to track down
the appropriate RFCs and familiarize myself with them. (Not a very difficult
thing. Took a total of about an hour, about 3-1/2 years ago.) Email shares
many similarities with Usenet, and I expect that if you were to find the
proper RFCs and read them (the help file should have links to where a copy is
kept on powerbasic.com), you'd be able to get your code working.

FWIW, nntp is *really* easy; it's just a matter of sending text commands with
the proper args ("AUTHINFO USER Auric__", "GROUP comp.lang.basic.powerbasic",
"POST", etc.). It's been nearly a decade since I played with email, but IIRC
it's just as easy.
--
Let's look under the option labeled "Dancing Hamsters".
Robert Wolfe
2009-01-08 00:40:02 UTC
Permalink
Post by Auric__
Did you make any changes to the sample code (aside from obvious things like
server, email address, etc.)?
The only change I made to the sample code was the change I made to get
the program to work like I wanted it to. Had the program add a CHR$(13)
to the end of each message body line it sent and things started working
like I wanted them to.
Post by Auric__
FWIW, nntp is *really* easy; it's just a matter of sending text commands with
the proper args ("AUTHINFO USER Auric__", "GROUP comp.lang.basic.powerbasic",
"POST", etc.). It's been nearly a decade since I played with email, but IIRC
it's just as easy.
I've actually thought about writing a news client at some point. The
issue I have is figuring out how to get it to store the messages in one
message per file format.
Michael Mattias
2009-01-08 15:40:59 UTC
Permalink
Post by Robert Wolfe
I've actually thought about writing a news client at some point. The
issue I have is figuring out how to get it to store the messages in one
message per file format.
You actually WANT to store newgroup messages one per physical file?

As my late sainted mother often said, "Be careful what you wish for!"


MCM
Robert Wolfe
2009-01-08 20:55:29 UTC
Permalink
Post by Michael Mattias
Post by Robert Wolfe
I've actually thought about writing a news client at some point. The
issue I have is figuring out how to get it to store the messages in one
message per file format.
You actually WANT to store newgroup messages one per physical file?
As my late sainted mother often said, "Be careful what you wish for!"
MCM
Yes, actually. Then eventually update the program to write news
articles to FTS-0001 type files for incorporating into another system of
mine.
Auric__
2009-01-09 17:51:03 UTC
Permalink
Post by Robert Wolfe
Post by Auric__
Did you make any changes to the sample code (aside from obvious things
like server, email address, etc.)?
The only change I made to the sample code was the change I made to get
the program to work like I wanted it to. Had the program add a CHR$(13)
to the end of each message body line it sent and things started working
like I wanted them to.
So... is it working now?
Post by Robert Wolfe
Post by Auric__
FWIW, nntp is *really* easy; it's just a matter of sending text
commands with the proper args ("AUTHINFO USER Auric__", "GROUP
comp.lang.basic.powerbasic", "POST", etc.). It's been nearly a decade
since I played with email, but IIRC it's just as easy.
I've actually thought about writing a news client at some point. The
issue I have is figuring out how to get it to store the messages in one
message per file format.
That should be easy. You have to get each message individually anyway, so
it's just a matter of writing the message to an appropriately-named file.
(I'd make sure to not do this on FAT or FAT32, though -- there could be a lot
of wasted space on small posts.)
--
Charming. Your backup superpower is denial.
Bart Lateur
2009-01-09 10:09:30 UTC
Permalink
Post by Robert Wolfe
I am working on a custom SMTP mailer for a much bigger project that I am
working on in PB/CC. My problem is that the SMTP transfer goes ok, but
the resulting email that gets sent gets sent with the body of the
message between the X-Header information (if any) and the date
information. I am using the code sample for SMTP from the PB/CC help.
It sounds to me like you're not properly separating the headers from the
body. Just as with http (which is based on the mail format), you need an
empty line between headers and body.
--
HTH,
Bart.
Loading...