Thread View: borland.public.cppbuilder.internet.socket
1 messages
1 total messages
Started by Gustavo
Tue, 25 Jul 2006 02:54
NMPOP3 and NMSMTP
Author: Gustavo
Date: Tue, 25 Jul 2006 02:54
Date: Tue, 25 Jul 2006 02:54
47 lines
2142 bytes
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
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads