I use this same approach on a couple of other VPS hosted websites with the exception of adding the port attribute to the network line. Seeing as the websites here don’t run in full trust mode, the port attributes causes permission problems here.
Anyway, the error I’m receiving now is “The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 30sm8162202wfc.15”. Any ideas?
I use the same code in some other environments (non Jodo) without issue, but I have the port (port 587) listed in the config file. From my understanding, only port 25 is allowed in anything less than full trust environments. Does that sound right to you? If I leave the port in there, I get a permissions issue on Jodo servers.
For anyone interested in the “solution”, here goes.
Port change through web.config for mail settings only works in full trust. Jodo doesn’t allow full trust on shared environments. To get around this, I used the “localhost” mail server to send the outgoing mail. This website is only sending mail to one domain user, “[email protected]”, so I’m not concerned about the emails being flagged as spam.