SmtpClient with Gmail

后端 未结 6 724
忘了有多久
忘了有多久 2020-11-29 03:47

I\'m developing a mail client for a school project. I have managed to send e-mails using the SmtpClient in C#. This works perfectly with any server but it doesn

6条回答
  •  爱一瞬间的悲伤
    2020-11-29 04:40

    Try running this:

    mozroots --import --ask-remove
    

    in your system (just in bash or from Mono Command Prompt if it is on Windows). And then run the code again.

    EDIT:

    I forgot you also should run

    certmgr -ssl smtps://smtp.gmail.com:465
    

    (and answer yes on questions). This works for me on Mono 2.10.8, Linux (with your example).

提交回复
热议问题