Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages
Started by Benjamin
Tue, 01 Aug 2006 01:01
How to send email from application
Author: Benjamin
Date: Tue, 01 Aug 2006 01:01
Date: Tue, 01 Aug 2006 01:01
8 lines
1194 bytes
1194 bytes
Hi i wanna send an email from my application, assuming that the user or me does not have outlook setup etc. Also wondering how to authenticate if i was to use smtp.google.com as host ? I duno.. plse help. -- Simon ----------------------------------------------------------------- msn : livestrings@gmail.com
Re: How to send email from application
Author: Andrue Cope [TeamB]
Date: Tue, 01 Aug 2006 07:02
Date: Tue, 01 Aug 2006 07:02
62 lines
2711 bytes
2711 bytes
Benjamin wrote:
> Hi i wanna send an email from my application, assuming that the user
> or me does not have outlook setup etc. Also wondering how to
> authenticate if i was to use smtp.google.com as host ? I duno.. plse
> help.
Hope this helps:
AnsiString filePath=General_TemporaryFilePath()+".VRA";
sl->SaveToFile( filePath );
MapiMessage message;
memset( &message, 0, sizeof( message ) );
switch( MessageDlg( "For convenience a control file has been prepared
listing the viewers "
"you want assistance with. Do you want to email
this file now?",
mtConfirmation,
TMsgDlgButtons()<<mbYes<<mbNo<<mbCancel,
0 ) )
{
case mrYes:
{
message.lpszSubject="I need assistance";
message.lpszNoteText="Please open the link below using WindyE and
let me know what "
"conclusions you draw.";
MapiRecipDesc recipInfo;
memset( &recipInfo, 0, sizeof( recipInfo ) );
recipInfo.ulRecipClass=MAPI_ORIG;
recipInfo.lpszName="";
recipInfo.lpszAddress="";
message.lpOriginator=&recipInfo;
MapiFileDesc fileInfo;
memset( &fileInfo, 0, sizeof( fileInfo ) );
fileInfo.nPosition=0;
fileInfo.lpszPathName=filePath.c_str();
fileInfo.lpszFileName="Assistance request";
message.nFileCount=1;
message.lpFiles=&fileInfo;
MapiRecipDesc recipInfo2;
memset( &recipInfo2, 0, sizeof( recipInfo2 ) );
recipInfo2.ulRecipClass=MAPI_TO;
recipInfo2.lpszName="";
recipInfo2.lpszAddress="";
message.nRecipCount=1;
message.lpRecips=&recipInfo2;
break;
}
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
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