Using Google for outgoing mail

zero

Perch
I have Google apps setup on a client site and I'm trying to send mail using Google's smtp server. The website is written in ASP.NET.

Below is the web.config excerpt:
Code:
        <system.net >
		<mailSettings >
			<smtp>
				<network host="smtp.googlemail.com" userName="[email protected]"
                      password="topsecret" defaultCredentials="false"/>
			</smtp>
		</mailSettings>
	</system.net>

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?
 
oh :) No clue how to do TLS auth!
Ha, you got my hopes up.

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.

So far everything is working as expected.

Thanks again for the help, Stephen.
 
As of today, localhost is no longer working for outgoing mail for this project. I have a support ticket entered (#CNV-16028-717).
 
Back
Top