We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DnsMailClient is not reliable

Using the following, very basic line of code:

new Aspose.Network.Mail.DnsMailClient().Send( message );

…we get the following failure about 50% of the time:

"<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>Aspose.Network.Mail.SmtpFailedRecipientsException: At
least one receipents are failed."



The problem is intermittent and there is no pattern. There is no relationship between the message sent and the occurrence of failure.

If we go back to using SmtpClient with the same messages, everything works fine every time.

Thanks for considering Aspose.

DnsMailClient is based on the MX records from the email domain. Then it sends emails to the mx servers directly. The process is more complicated than the Smtp sending. It is the reason why it fails.

Could you provide more detailed about your product scenarios? Could you please the detail infomation of the SmtpFailedRecipientsException? Like print out the Exception.ToString(). It will really help our debugging.

Our product developers will work on the this feature to make it more reliable. I will keep you posted.

Thanks,

Exception.ToString() looks like this:

Unhandled Exception: Aspose.Network.Mail.SmtpFailedRecipientsException:
At least one receipents are failed.

at Aspose.Network.Mail.SmtpClient.x8b951d748e93f852(MailMessage x1f25abf5fb75e795)

at Aspose.Network.Mail.DnsMailClient.Send(MailMessage message)

The scenario isn’t any more complicated than sending an arbitrary email message from an arbitrary computer.

Hello,

The SmtpFailedRecipientsException contains the errors about the recipient that fail to deliver. You can check the innerExceptions[] property of the SmtpFailedRecipientsException. Then check the FiledRecipient and Response property.

Could you please post the information to me?

Thanks,