CDO Send To Space-Included Emailaddress

F

fyitang

hi guys, i'm using the methods of CDO.MessageClass to send email. like
this:

using CDO;
....
Configuration MailConfig = new ConfigurationClass();
MailConfig.Fields[CdoConfiguration.cdoSendUsingMethod].Value =
CdoSendUsing.cdoSendUsingPort;
MailConfig.Fields[CdoConfiguration.cdoSMTPAuthenticate].Value =
CdoProtocolsAuthentication.cdoBasic;
MailConfig.Fields[CdoConfiguration.cdoSMTPServer].Value =
txtSmtpServer.Text;//SMTPServer;
MailConfig.Fields[CdoConfiguration.cdoSMTPServerPort].Value =
txtPortNumber.Text;//PortNumber;
MailConfig.Fields[CdoConfiguration.cdoSMTPConnectionTimeout].Value =
txtTimeout.Text;//Timeout;
MailConfig.Fields[CdoConfiguration.cdoSMTPAccountName].Value =
txtSenderName.Text;//sendername
MailConfig.Fields[CdoConfiguration.cdoSendUserName].Value =
txtSenderAddress.Text;//UserName;
MailConfig.Fields[CdoConfiguration.cdoSendPassword].Value =
txtPwd.Text;//Password;
MailConfig.Fields.Update();

MessageClass MailMsg = new MessageClass();
MailMsg.Configuration = MailConfig;
MailMsg.From = txtSenderAddress.Text;
MailMsg.To = txtMailto.Text;
MailMsg.Subject = txtSubject.Text;
MailMsg.HTMLBody = "test...";

MailMsg.Send();

these codes work when the txtMailto.text is set like
"(e-mail address removed)", now i got a assignment of sending mail to
addresses like "fyi (e-mail address removed)", but it can not work. of course it
is not allowed to include space in gmail's address, but my customers
do have these space-included email addresses, and their mail system is
fine with them. how should i do with it?any tips is appreciated.
thanks very much.
 
H

Henning Krause [MVP - Exchange]

Hello,

spaces are allowed if the local part of the email address is quoted like
this:

"test email address with spaces"@example.com

You could try this....

Kind regards,
Henning Krause
 
F

fyitang

Hello,

spaces are allowed if the local part of the email address is quoted like
this:

"test email address with spaces"@example.com

You could try this....

Kind regards,
Henning Krause


hi guys, i'm using the methods of CDO.MessageClass to send email. like
this:
using CDO;
...
Configuration MailConfig = new ConfigurationClass();
MailConfig.Fields[CdoConfiguration.cdoSendUsingMethod].Value =
CdoSendUsing.cdoSendUsingPort;
MailConfig.Fields[CdoConfiguration.cdoSMTPAuthenticate].Value =
CdoProtocolsAuthentication.cdoBasic;
MailConfig.Fields[CdoConfiguration.cdoSMTPServer].Value =
txtSmtpServer.Text;//SMTPServer;
MailConfig.Fields[CdoConfiguration.cdoSMTPServerPort].Value =
txtPortNumber.Text;//PortNumber;
MailConfig.Fields[CdoConfiguration.cdoSMTPConnectionTimeout].Value =
txtTimeout.Text;//Timeout;
MailConfig.Fields[CdoConfiguration.cdoSMTPAccountName].Value =
txtSenderName.Text;//sendername
MailConfig.Fields[CdoConfiguration.cdoSendUserName].Value =
txtSenderAddress.Text;//UserName;
MailConfig.Fields[CdoConfiguration.cdoSendPassword].Value =
txtPwd.Text;//Password;
MailConfig.Fields.Update();
MessageClass MailMsg = new MessageClass();
MailMsg.Configuration = MailConfig;
MailMsg.From = txtSenderAddress.Text;
MailMsg.To = txtMailto.Text;
MailMsg.Subject = txtSubject.Text;
MailMsg.HTMLBody = "test...";

these codes work when the txtMailto.text is set like
"(e-mail address removed)", now i got a assignment of sending mail to
addresses like "fyi (e-mail address removed)", but it can not work. of course it
is not allowed to include space in gmail's address, but my customers
do have these space-included email addresses, and their mail system is
fine with them. how should i do with it?any tips is appreciated.
thanks very much.

thanks Henning. i have tried this one <"test (e-mail address removed)">, and
this worked. thank you.
 
Top