Thanks for your reply Brassica,
I've just performed some research on my local windows 2003 server box. It
seems the email sent via the CDO sys(or the .NET System.net.Mail
componenhts) can display the local time on client machine(the SMTP client),
for me I use outlook. Also, event I change the culture info or timezone at
server, it won't affect the client-side displaying result.
Here is my test code(the CDO code you provided as well as system.net.Mail
code I used):
==============================
private void btnCDO_Click(object sender, EventArgs e)
{
CDO.Message oMsg = new CDO.Message();
CDO.IConfiguration iConfg;
iConfg = oMsg.Configuration;
ADODB.Fields oFields;
oFields = iConfg.Fields;
ADODB.Field oField =
oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
oField.Value = CDO.CdoSendUsing.cdoSendUsingPort;
oField =
oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
oField.Value = "smtphost";
oField =
oFields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"];
oField.Value = CDO.CdoProtocolsAuthentication.cdoNTLM;
oFields.Update();
oMsg.From = "(E-Mail Removed)";
oMsg.To = "(E-Mail Removed)";
oMsg.Subject = "New turnkey order: New Email";
oMsg.TextBody = "Hi, this is a test!";
oMsg.Send();
}
private void btnNetSmtp_Click(object sender, EventArgs e)
{
Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("de-DE");
MailMessage msg = new MailMessage(
"(E-Mail Removed)",
"(E-Mail Removed)",
"test email for issue",
"this is a test email!");
SmtpClient client = new SmtpClient("smtphost");
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = true;
client.Send(msg);
}
==================================
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?= <(E-Mail Removed)>
>References: <347BFE05-0653-472B-8129-(E-Mail Removed)>
<(E-Mail Removed)>
<026DA942-099B-4CDC-8A7B-(E-Mail Removed)>
<Vgtu1WG#(E-Mail Removed)>
>Subject: RE: CDO timestamp
>Date: Thu, 7 Aug 2008 10:53:01 -0700
>
>This is running on Windows Small Business Server 2003R2 under asp.net 2.0
>
> CDO.Message oMsg = new CDO.Message();
> CDO.IConfiguration iConfg;
> iConfg = oMsg.Configuration;
> ADODB.Fields oFields;
> oFields = iConfg.Fields;
> // Set configuration.
> ADODB.Field oField =
>oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
> //TODO: To send by using the smart host, uncomment the
>following lines:
> oField.Value = CDO.CdoSendUsing.cdoSendUsingPort;
> oField =
>oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
> oField.Value = "aaserver";
> oFields.Update();
> oMsg.From = strSalesRepEmail + "@aapcb.com";
> oMsg.To = "(E-Mail Removed); (E-Mail Removed);
>(E-Mail Removed)";
> oMsg.BCC = "(E-Mail Removed)";
> oMsg.Subject = "New turnkey order: WO# " +
>strGlobalWorkOrder;
> oMsg.TextBody = "Hi";
> oMsg.Send();
>
>
>"Steven Cheng [MSFT]" wrote:
>
>> Thanks for your reply Brassica,
>>
>> Would you provide me some code snippet of your CDO message sending so
that
>> I can perform some local test on it. BTW, may I also have your current
>> client operating system's version and some .net framework environment
>> information?
>>
>> Sincerely,
>>
>> Steven Cheng
>> Microsoft MSDN Online Support Lead
>>
>>
>> Delighting our customers is our #1 priority. We welcome your comments
and
>> suggestions about how we can improve the support we provide to you.
Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> (E-Mail Removed).
>>
>> =>> >>
>> >> --------------------
>> >> >From: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?=
<(E-Mail Removed)>
>> >> >Subject: CDO timestamp
>> >> >Date: Mon, 4 Aug 2008 11:44:17 -0700
>> >>
>> >> >I have an application that uses CDO to send an email alert to
>> management
>> >> when
>> >> >certain events occur. The messages alway have the wrong time. It
>> appears
>> >> >the time is UTC. The computer date and time are correct on the
machine
>> >> >running the program (SBS2003R2). How do I get the local time on my
>> email
>> >> >alerts.
>> >> >
>> >>
>> >>
>> >
>>
>>
>