Hello,
Hi Faruk,
Thank you for writing to Aspose Support team.
SecurityOptions.None is the recommended option for connecting to SMTP servers without SSL. We tested the below sample code and it worked for us.
' Declare msg as MailMessage instance
Dim msg As New MailMessage()
msg.To = "user@gmail.com"
msg.From = "user@local.com"
msg.Subject = "Test"
' Create an instance of SmtpClient class
Dim client As New SmtpClient()
' Specify your mailing host server, Username, Password, Port # and Security option
client.Host = "localhost"
client.Username = "user@local.com"
client.Password = "password"
client.Port = 25
client.SecurityOptions = SecurityOptions.None
Try
' Client.Send will send this message
client.Send(msg)
Catch ex As Exception
System.Diagnostics.Trace.WriteLine(ex.ToString())
End Try
<!–[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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<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]>
<![endif]–>Please share your complete sample code and a test account to reproduce the issue you are facing while connecting to your server. We’ll analyze it further to assist you accordingly.