Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Send Email with Return ReceiptDownloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries Sample C++ program to send an email with a return-receipt. #define _CRTDBG_MAP_ALLOC #include <windows.h> #include <stdio.h> #include <crtdbg.h> #include "C:/ck2000/components/ChilkatLib/Package/Include/CkSettings.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkCert.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkEmail.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkEmailBundle.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkMailMan.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkString.h" #include "C:/ck2000/components/ChilkatLib/Package/Include/CkByteData.h" void EmailExample(void) { CkMailMan mailman; // Any string passed to UnlockComponent begins the 30-day trial. bool unlocked = mailman.UnlockComponent("30-day trial"); if (!unlocked) { printf("Failed to unlock component\n"); return; } mailman.put_SmtpHost("mail.earthlink.net"); // Send an email with a return-receipt CkEmail email; // Set the ReturnReceipt property to true to request a Return Receipt. email.put_ReturnReceipt(true); email.put_Body("This is the email body"); email.put_Subject("This is the email subject"); email.AddTo("Chilkat Support","support@chilkatsoft.com"); email.put_FromAddress("matt@chilkatsoft.com"); // Send the email with a return receipt. if (!mailman.SendEmail(&email)) { mailman.SaveLastError("errors.xml"); } } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { freopen("stdout.txt","w",stdout); EmailExample(); CkSettings::cleanupMemory(); _CrtDumpMemoryLeaks(); return 0; }
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.