🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2220

NMPOP3 and NMSMTP

#2220
From: Gustavo
Date: Tue, 25 Jul 2006 02:54
47 lines
2142 bytes
Hi friends,

I did a program to send mails.
The problem is authenticate me in ISP.
I don't know how do it.
Any help will be wellcome
Thanks Gustavo

My code:

void __fastcall TForm1::Button1Click(TObject *Sender)
{

 NMPOP31->AttachFilePath = ".";
 NMPOP31->DeleteOnRead = FALSE;
 NMPOP31->ReportLevel = Status_Basic;
 NMPOP31->TimeOut = 20000;
 NMPOP31->Host = "pop.terra.com.br";
 NMPOP31->Port = 110;
 NMPOP31->UserID = "mylogin";
 NMPOP31->Password = "mypassword";
 NMPOP31->Connect();

//Conect to server
if (NMSMTP1->Connected)
 {
//Data to autenticate
NMSMTP1->ClearParams = TRUE;
NMSMTP1->Host = "smtp.terra.com.br";
NMSMTP1->Port = 25;
NMSMTP1->UserID = "mylogin";
NMSMTP1->Connect();

//Data of e-mail
NMSMTP1->PostMessage->FromAddress="my@mail.com.br";
NMSMTP1->PostMessage->FromName="Gustavo";
NMSMTP1->PostMessage->ToAddress->Text=Memo1->Text;
NMSMTP1->PostMessage->ToBlindCarbonCopy->Text=Memo4->Text;
NMSMTP1->PostMessage->Date= Now();
NMSMTP1->PostMessage->Body->Text=Memo3->Text;
NMSMTP1->PostMessage->Attachments->Text=ListBox1->Items->Text;
NMSMTP1->PostMessage->Subject=Memo2->Text;
NMSMTP1->PostMessage->ReplyTo="my@mail.com.br";
NMSMTP1->SendMail(); //Envia o e-mail
ShowMessage("The message was sent");
//Close();  //Fecha a janela
} 
Technical Details
Message-ID: <44c588ca$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,29bc5fad3a8f9360,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Gustavo" <nao@dou.meu.email>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: NMPOP3 and NMSMTP
Date: Mon, 24 Jul 2006 23:54:08 -0300
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
NNTP-Posting-Host: 201.37.255.108
Message-ID: <44c588ca$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1153796298 201.37.255.108 (24 Jul 2006 19:58:18 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail