Email verification failing

I keep getting the following exception when I try to test/verify email settings:

Failed: Send test email
2013-10-02 19:39:04 DEBUG  Loading the SMTP server configuration
2013-10-02 19:39:04 DEBUG  SMTP host: smtp.gmail.com
2013-10-02 19:39:04 DEBUG  SMTP port: 465
2013-10-02 19:39:04 DEBUG  SSL enabled: True
2013-10-02 19:39:04 DEBUG  SMTP login: octopus4good@gmail.com
2013-10-02 19:39:04 DEBUG  From: OctopusDeploy
2013-10-02 19:39:04 DEBUG  Creating the test email message
2013-10-02 19:39:04 DEBUG  The email subject is: Octopus Deploy email test
2013-10-02 19:39:04 DEBUG  The email is to: s@madigan.net
2013-10-02 19:39:08 ERROR  One or more errors occurred. System.FormatException: The specified string is not in the form required for an e-mail address.
Server stack trace:
at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at Octopus.Server.Tasks.TestEmail.TestEmailControllerActivity.CreateMessage(SmtpConfiguration smtp, String to) in c:\w\e6923628be6eaf72\source\Octopus.Server\Tasks\TestEmail\TestEmailControllerActivity.cs:line 60
at Octopus.Server.Tasks.TestEmail.TestEmailControllerActivity.<Execute>d__0.MoveNext() in c:\w\e6923628be6eaf72\source\Octopus.Server\Tasks\TestEmail\TestEmailControllerActivity.cs:line 43
Exception rethrown at [0]:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Octopus.Shared.Activities.ActivityRuntime.<Execute>d__5.MoveNext() in c:\w\e6923628be6eaf72\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 56

Am I doing something stupid? The email addresses are all valid and I’ve tried numerous addresses with no luck

Hi,

This help forum has blocked the email address you used - could you send it to me at paul AT octopusdeploy.com?

Paul

Hi Stephen,

The issue isn’t with the “To” address but with the “From” address:

From: OctopusDeploy

This will need to be an email address.

Paul

Hi Paul,

I am also not able to configure the email task. Following is the error:-
Loading the SMTP server configuration
17:25:02Verbose
SMTP host: smtp.gmail.com
17:25:02Verbose
SMTP port: 465
17:25:02Verbose
SSL enabled: True
17:25:02Verbose
SMTP login: gouravnayyar@gmail.com
17:25:02Verbose
From: gouravnayyar@gmail.com
17:25:02Verbose
Creating the test email message
17:25:02Verbose
The email subject is: Octopus Deploy email test
17:25:02Verbose
The email is to: gourav.nayyar@happiestminds.com
17:25:02Info
Sending test email…
17:26:42Verbose
Failed receiving Octopus.Platform.Deployment.Messages.TestEmail.StartEmailTestCommand
The operation has timed out.
System.Net.Mail.SmtpException: The operation has timed out.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Octopus.Server.Orchestration.TestEmail.TestEmailOrchestrator.Receive(StartEmailTestCommand command) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Orchestration\TestEmail\TestEmailOrchestrator.cs:line 47
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
17:26:43Fatal
The operation has timed out.
System.Net.Mail.SmtpException: The operation has timed out.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Octopus.Server.Orchestration.TestEmail.TestEmailOrchestrator.Receive(StartEmailTestCommand command) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Orchestration\TestEmail\TestEmailOrchestrator.cs:line 47
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
17:26:43Verbose
The task failed

Regards
Gourav

Hi Gourav,

The “operation timed out” error suggests Octopus can’t connect to the SMTP server. Are there any firewalls preventing you from connecting to that SMTP port? What happens if you create your own SMTP client app and attempt to send an email from the Octopus server?

Paul

Hi Paul,

Actually I have installed the Octopus server in the Amazon machine. Should I require to open the specific port for that?

Regards
Gourav

I am getting the same error on an AWS instance as well, oddly, the same configuration with Team City works fine. Did you resolve this?

Error in TestEmailOrchestrator-Cg-0P8ydfSI@SQ-DEPLOY-221E7F7B while receiving 7c1048d7-ad49-4594-a4f5-08040a88801f System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Octopus.Server.Orchestration.TestEmail.TestEmailOrchestrator.Receive(StartEmailTestCommand command)

Here is the raw log on the failure:

Loading the SMTP server configuration
SMTP host: smtp.gmail.com
SMTP port: 465
SSL enabled: True
SMTP login: (removed)
From: (removed)
Creating the test email message
The email subject is: Octopus Deploy email test
The email is to: (removed)
Sending test email…
Failed receiving Octopus.Platform.Deployment.Messages.TestEmail.StartEmailTestCommand The operation has timed out. System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Octopus.Server.Orchestration.TestEmail.TestEmailOrchestrator.Receive(StartEmailTestCommand command) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Orchestration\TestEmail\TestEmailOrchestrator.cs:line 47 at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
The operation has timed out. System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Octopus.Server.Orchestration.TestEmail.TestEmailOrchestrator.Receive(StartEmailTestCommand command) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Orchestration\TestEmail\TestEmailOrchestrator.cs:line 47 at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
The task failed

Thank you for your email. I am away from the office and will return on Monday, April 21. If your message requires a reply, I will respond when I return.

For immediate needs, please contact
Aravind Dhakshinamoorthy
aravind.d@happiestminds.com
Work:- +91-80-33203563


Happiest Minds Disclaimer

This message is for the sole use of the intended recipient(s) and may contain confidential, proprietary or legally privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the original intended recipient of the message, please contact the sender by reply email and destroy all copies of the original message.

Happiest Minds Technologies http://www.happiestminds.com


Any update on this one?

Hi Joshua,

It seems from posts like this that port 587 might work for you:

http://social.microsoft.com/Forums/en-US/671278ed-3897-45fa-9be8-e1687bbb0ae8/error-configuring-gmail-as-the-outgoing-smtp-email-server-in-crm-40?forum=crm

Regards,
Nick

That was it, thanks!