 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Benjamin Guest
|
Posted: Tue Aug 01, 2006 6:01 am Post subject: How to send email from application |
|
|
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 (AT) gmail (DOT) com |
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Tue Aug 01, 2006 8:10 am Post subject: Re: How to send email from application |
|
|
Benjamin wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|