PDA

View Full Version : میشه این کد رو توضیح بدین ؟



taze kar
سه شنبه 02 فروردین 1384, 11:29 صبح
This is a simple example showing how to send email in C++.

#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/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");

// Create the email, add the body, recipients, subject, etc.
CkEmail email;
email.put_Body("This is a test\r\nThis is line #2");

email.AddTo("Chilkat Support","support@chilkatsoft.com");

email.put_FromAddress("somebody@chilkatsoft.com");

email.put_Subject("This is a test");

// Send the email
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;
}

:گیج:

taze kar
سه شنبه 02 فروردین 1384, 11:30 صبح
[quote]<span dir=ltr>This is a simple example showing how to send email in C++.

#define _CRTDBG_MAP_ALLOC
#include &lt;windows.h>
#include &lt;stdio.h>
#include &lt;crtdbg.h>

#include "C:/ck2000/components/ChilkatLib/Package/Include/CkSettings.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");

// Create the email, add the body, recipients, subject, etc.
CkEmail email;
email.put_Body("This is a test\r\nThis is line #2");

email.AddTo("Chilkat Support","support@chilkatsoft.com");

email.put_FromAddress("somebody@chilkatsoft.com");

email.put_Subject("This is a test");

// Send the email
if (!mailman.SendEmail(&amp;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;
}

taze kar
سه شنبه 02 فروردین 1384, 11:31 صبح
البته شرمنده نمی دونم چرا قاتی پوریاس شد این کد :mrgreen: :گیج:

Pars Giga
یک شنبه 15 خرداد 1384, 09:28 صبح
چی هست