开发者

Sending Fax using SMTPClient?

We have a exchangeserver configured to send the attachment of a email as fax if the the "to-address-field" is in the format [fax:开发者_如何学运维user/company@faxnumber] (used internally). It works when I send manually from Outlook. But how can send an email with to-address as above using Smtpclient?

Is it possible to suppress the emailaddress validation? at the moment i get this error: "System.FormatException : The specified string is not in the form required for an e-mail address."


I'm fairly sure that it's not possible. However, at least in .Net 4.0 (which is less restrictive than earlier versions), everything except the : is fine though. Maybe you could get the admins to change the SMTP server to support other characters than : after the string fax?

For example, maybe you could use fax= instead.


It is not possible through the SmtpClient. If fax=asdfasdf is wanted then going through interop.outlook.dll is needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜