views:

730

answers:

4

Hello everyone,

I am getting an error using my email ext plugin from hudson. I am trying send an email to the following schema = "< firstName >_< LastName >@< subgroup >.< companyName >.com ex: [email protected]

I cannot send emails to this address via the email extension plugin. The regular email generator works with this address schema.

I am wondering if the Address Checker module in the plugin is too strict about the address name.

Is there any workaround?

I get the following spew from Hudson:

Jun 22, 2009 2:48:53 PM hudson.plugins.emailext.ExtendedEmailPublisher sendMail WARNING: Could not send email. javax.mail.internet.AddressException: Illegal address in string ``'' at javax.mail.internet.InternetAddress.(InternetAddress.java:94) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:287) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:249) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:241) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:199) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:188) at hudson.model.Run.run(Run.java:962) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119)

=================================================================================

A: 

I'm using that plugin too and I haven't had any such problems.

The warning appears to be complaining about your configuration. Maybe you'd want to double-check the email address that you typed? Whitespace as separator char for multiple emails? Also, double-check your sytem configuration and make sure you've configured your SMTP server or the default suffix correctly.

aberrant80
A: 

You can browse the code but I would guess that the javax mail validator is not too strict - it's built in to java. In the latest code, I don't see the InternetAddress(String) constructor on line 287, so I wonder what version of the plugin you are currently using.

Also, what options do you have selected for email? Send to culprits?

Michael Donohue
+1  A: 

Is this really how you have it in Hudson?

"< firstName >_< LastName >@< subgroup >.< companyName >.com

(you have an open quote but no close quote)

If so, that may be your problem.

Jack Leow
A: 

Yup this is a bug (HUDSON-7057).

Based off of the latest code in the trunk:

this fails: " [email protected] [email protected]" works as expected: "[email protected] [email protected] " works as expected: "[email protected] [email protected]"

Scrutinize what you put in the recipient list for random whitespace.

Ash Lux