Article View: borland.public.cppbuilder.nativeapi
Article #580Re: porting to Microsoft Exchange
From: Remy Lebeau (TeamB)
Date: Fri, 29 Feb 2008 18:31
Date: Fri, 29 Feb 2008 18:31
51 lines
2796 bytes
2796 bytes
"Robert G. Hoover" <not.a.real.address@anywhere.sorry> wrote in message
news:47c80f8b$1@newsgroups.borland.com...
> It seems to me that I'm talking the SMTP talk and for some
> reason (probably specific to the customer's security) my talk
> is coming back void...
Meaning what exactly? You need to be more specific.
> Here's my code... sorry for the formatting... does anything jump
> out to you?
Well, for one thing, you are doing everything manually instead of using an
actual SMTP component. You are not implementing the SMTP protocol even
remotely correct at all. You are sending all of your commands as one big
string, which is the wrong way to handle SMTP. You are using "\n" for every
line break between commands when you need to use "\r\n" instead. And you
are not processing any of the SMTP replies at all.
I strongly suggest you drop your code altogether and use a real SMTP
component instead, such as from Indy or ICS. Let it do all of the low-level
work for you.
> If I pair up the communications, I suppose it would look like this...
Almost. You have to wait for the greeting to arrive before sending the EHLO
command, which will have its own reply (that you have not shown).
> mail from:myemail@mydomain.com
You need to enclose email addresses in angle brackets:
mail from:<myemail@mydomain.com>
rcpt to:<someone@theirdomain.com>
> data
>
> 500 5.3.3 Unrecognized command
>
> from:
>
> 500 5.3.3 Unrecognized command
<snip>
Everything after the DATA command is arbitrary message text. It is not a
series of SMTP commands.
Gambit
Technical Details
Message-ID:
<47c84f5c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47c59455@newsgroups.borland.com> <n55bs3paa8o0nmdjrf6cee1m3gmdiebb5f@4ax.com> <47c596ee$1@newsgroups.borland.com> <47c5a144$1@newsgroups.borland.com> <47c80f8b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4f7d962ca9c0a145 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <47c59455@newsgroups.borland.com> <n55bs3paa8o0nmdjrf6cee1m3gmdiebb5f@4ax.com> <47c596ee$1@newsgroups.borland.com> <47c5a144$1@newsgroups.borland.com> <47c80f8b$1@newsgroups.borland.com> Subject: Re: porting to Microsoft Exchange Date: Fri, 29 Feb 2008 10:31:16 -0800 Lines: 53 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 207.178.157.90 Message-ID: <47c84f5c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204309852 207.178.157.90 (29 Feb 2008 10:30:52 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail