c# - A call to SSPI failed while sending email using amazon ses from windows application -


i using amazon ses send emails, , use same config inside website , windows application.
website sending emails windows application gives me error , not emails sent:enter image description here

note when change smtp config in windows app gmail works fine, problem happen amazon ses , started happen today, before ses working fine on windows app.
note both website , windows app working local.

stack trace:

   @ system.net.security.sslstate.startsendauthresetsignal(protocoltoken message, asyncprotocolrequest asyncrequest, exception exception)    @ system.net.security.sslstate.checkcompletionbeforenextreceive(protocoltoken message, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.startsendblob(byte[] incoming, int32 count, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.processreceivedblob(byte[] buffer, int32 count, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.startreadframe(byte[] buffer, int32 readbytes, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.startreceiveblob(byte[] buffer, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.checkcompletionbeforenextreceive(protocoltoken message, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.startsendblob(byte[] incoming, int32 count, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.forceauthentication(boolean receivefirst, byte[] buffer, asyncprotocolrequest asyncrequest)    @ system.net.security.sslstate.processauthentication(lazyasyncresult lazyresult)    @ system.net.tlsstream.callprocessauthentication(object state)    @ system.threading.executioncontext.runinternal(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx)    @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx)    @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state)    @ system.net.tlsstream.processauthentication(lazyasyncresult result)    @ system.net.tlsstream.write(byte[] buffer, int32 offset, int32 size)    @ system.net.pooledstream.write(byte[] buffer, int32 offset, int32 size)    @ system.net.mail.smtpconnection.flush()    @ system.net.mail.readlinescommand.send(smtpconnection conn)    @ system.net.mail.ehellocommand.send(smtpconnection conn, string domain)    @ system.net.mail.smtpconnection.getconnection(servicepoint servicepoint)    @ system.net.mail.smtptransport.getconnection(servicepoint servicepoint)    @ system.net.mail.smtpclient.getconnection()    @ system.net.mail.smtpclient.send(mailmessage message)    @ mail.emailsender.sendmail(mailmessage mail) in e:\mail\emailsender.cs:line 175 

innerexception:

{"the message received unexpected or badly formatted"} 

i had same problem, in end came down securityprotocol in effect when trying connect.

adding

servicepointmanager.securityprotocol = securityprotocoltype.tls; 

before client.send resolved me (we change ssl3 elsewhere talk different service) nice if (and servercertificatevalidationcallback) wasn't global if on .net team reading.

i don't know if 'feature' of ses or me assuming magic should work, can see history here: https://forums.aws.amazon.com/thread.jspa?messageid=472516


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -