VS.NET 2010 (and above) Users Click Here   

HOMECONTACT PRODUCTS DOWNLOADS PURCHASE TESTIMONIALS FORUMS COMPANY CONTACT
Home
Products
Downloads
Purchase
Licensing
Licensing FAQ
Software Updates
Support Forums
Testimonials
Feature Requests
Guarantee
About Us
Contact Us
Hosting Companies
Privacy Policy
   
Shopping Cart


General forum



[ Reply to Post ] [ Back To Forum ]
From: "dave wanta" <dave@...>
Date: 9/4/2009 10:43:23 AM
Subject: RE: Need to save .eml messages as .msg
Hi Andrew,
I'm assuming you are referring to aspNetEmail. If so,
there is actually a new queueing namespace called aspNetEmail.Queuing that will help you with this.

This new namespace contains a class called Rfc2822Queue, which is quite powerful, and gives you better control over submitting messages that support the RFC2822 (standard mime) format.

Here are 2 examples of how to use the new class:

private static void Rfc2822QueueTest()
{
	//create the EmailMessage  object
	EmailMessage m = new EmailMessage();

	//this example performs a MailMerge
	//set the mail merge fields
	m.From = "me@example.com";
	m.To="you@yourcompany.com";
	m.Subject = "Subject of the email goes here";
	m.Body = "the body of the email goes here....";

	//create the RFC2822 Queue object
	Rfc2822Queue rfcqueue = new Rfc2822Queue();

	//set the various queue properties
	rfcqueue.Directory = "c:\\QueueDirectory\\";
	rfcqueue.FileExtension = ".msg";

	//send the message to the Queue
	rfcqueue.Send( m );
}


private static void Rfc2822QueueMailMerge()
{
	//create the EmailMessage  object
	EmailMessage m = new EmailMessage();

	//this example performs a MailMerge
	//set the mail merge fields
	m.From = "test@example.com";
	m.To="##EmailAddress##";
	m.Subject = "Invoice for ##fldFirstName##";
	m.Body = "Hi ##fldFirstName## ##fldLastName##\r\nHere is your invoice....";

	//create the RFC2822 Queue object
	Rfc2822Queue rfcqueue = new Rfc2822Queue( m );

	//set the various queue properties
	rfcqueue.Directory = "c:\\QueueDirectory\\";
	rfcqueue.FileExtension = ".msg";

	//get the DataTable of data
	DataTable dt = GetDataTable();

	//perform the mail merge
	rfcqueue.SendMailMerge( dt );
}





To use this new class, you will want to make sure you are using at least version 3.6.0.4. You can download the latest aspNetEmail build update from
http://www.advancedintellect.com/page.aspx?cn=buildupdates

Let me know if you need anything else.

Cheers!
Dave

 

 

 



Thread View

Subject By Date
Need to save .eml messages as .msg Andrew Ryan 9/4/2009
   RE: Need to save .eml messages as .msg [ you are here ] dave wanta 9/4/2009

 

 

Testimonial

I LOVE your control. "

Dion

Read more testimonials
ListNanny aspNetDNS aspNetEmail aspNetPOP3 aspNetMX IPMuncher aspNetMIME aspNetPING aspNetTraceRoute aspNetIMAP aspNetMHT