Changed Xojo Cloud Server - smtp email stopped working - looking for ideas on why

I moved my Xojo Cloud account from an old server to a new server.
I still have access to both servers.
I run this code on both servers.

  • I get an email (as always) when I run on the old server.
  • I do NOT get an email when I run the same code on the new server.

Additional observations:

  1. Firewall seems to open OK on both servers
  2. I do not see evidence that the socket.connected event fires when run on the new server (where I do see the connected event fire on the old server)

Tapping the great minds on this forum to help me figure out what might be preventing success on the new server.

Ideas?

Here’s the code…

[code]using xojo.core

	Dim e As String = "Session ID: "+Session.Identifier
	Dim Mail As New EmailMessage
	
	mail.subject = "email test"
	mail.addRecipient dest
	mail.bodyPlainText = e
	
	fwp = New XojoCloud.FirewallPort(587, XojoCloud.FirewallPort.Direction.Outgoing)
	fwp.Open() ' This call is synchronous
	
	If NOT fwp.isOpen() Then
			Listbox1.AddRow "Firewall not open"
			
	Else
			Dim ss As New SMTPSecureSocket
			ss = new SMTPSecureSocket
			
			ss.address = "smtp.gmail.com"
			ss.ConnectionType = SSLSocket.TLSv12
			ss.port = 587
			
			ss.username = senderAddress
			ss.password = emailPassword
			ss.Secure = True
			
			Mail.fromAddress=senderAddress
			
			ss.messages.append Mail
			
			ss.SendMail
	End[/code]

Please put socket in property so it is not closed too early.

I tried that - doesn’t seem to work.
I created a property (as SMTPSecureSocket) on the webpage where the pushbutton exists that calls this routine. The page stays open throughout the process. I still do not see evidence of the Socket.connected event.

Just to assure the code is still OK - I tried it on the old server, and this version worked as well.

I pasted the modified code (just one line changed) below so you can see how I implemented it.

[code] using xojo.core

	Dim e As String = "Session ID: "+Session.Identifier
	Dim Mail As New EmailMessage
	
	mail.subject = "email test"
	mail.addRecipient dest
	mail.bodyPlainText = e
	
	fwp = New XojoCloud.FirewallPort(587, XojoCloud.FirewallPort.Direction.Outgoing)
	fwp.Open() ' This call is synchronous
	
	If NOT fwp.isOpen() Then
			Listbox1.AddRow "Firewall not open"
			
	Else
			ss = New SMTPSecureSocket
			AddHandler ss.ServerError,AddressOf serverErrorHandler
			AddHandler ss.ConnectionEstablished,AddressOf smtpConnectionHandler
			AddHandler ss.error,AddressOf smtpErrorHandler
			
			ss.address = "smtp.gmail.com"
			ss.ConnectionType = SMTPSecureSocket.TLSv12
			ss.port = 587
			
			ss.username = senderAddress
			ss.password = emailPassword
			ss.Secure = True
			
			Mail.fromAddress=senderAddress
			
			ss.messages.append Mail
			
			ss.SendMail
	End
	[/code]

Without knowing anything about XojoCloud… Are the OS exactly the same? I had this problem (albeit in PHP) where the openssl versions were different on different servers. Server A supported the cipher but server B did not which caused me some sever head-scratching.
As I said I don’t have a clue how Xojo implemented this, maybe they are not relying on the OS’s libs at all - I’m sorry for the waste of bits…

Try another email provider and rule out that Gmail is not blocking you.

Some VPS providers have IP reputation problems and large mail providers just flat out prevent mail connections from them because of spam. Cons of hourly billing is a lot of IP space has been blacklisted for the wrong doings of past tenants.

[quote=319349:@Phillip Zedalis]Try another email provider and rule out that Gmail is not blocking you.

Some VPS providers have IP reputation problems and large mail providers just flat out prevent mail connections from them because of spam. Cons of hourly billing is a lot of IP space has been blacklisted for the wrong doings of past tenants.[/quote]
Using gmail in both cases (including the one that works) - but I am planning to track them down as well.

Right but Gmail may have blocked your new IP.

Yep - will be hunting that down.

You could also try our MBS CURL Plugin to just get the error log.

No need. it’s a server issue. Tracking that down now.

Thanks to Greg and team for quickly wrestling this issue down and resolving it!