Re: Weird problem when sending mail with ERJavaMail
Re: Weird problem when sending mail with ERJavaMail
- Subject: Re: Weird problem when sending mail with ERJavaMail
- From: Markus Ruggiero <email@hidden>
- Date: Mon, 29 Apr 2019 17:08:46 +0200
Thanks all who came up with ideas.
With your help and the help of Mr. Google I finally found out what to do:
Had to define the following property:
mail.smtp.localhost=gugus.rucotec.ch <http://gugus.rucotec.ch/>
This was not needed up to now but maybe, perhaps....
I did upgrade my mail server from Yosemite to High Sierra with corresponding
Server.app. This might have introduced stricter checks. The current project was
the first one I had to implement mail sending since the upgrade and so I simply
copied the code over from older projects (but it did not occur to me to try to
run those and see whether they still functioned). Anyway setting this property
to any arbitrary host name fixed things. For the DHCP issued IP address, there
has never been a DNS entry and thus JavaMail used the IP address for EHLO
command.
And the error message is "a bit" missleading talking about invalid destination
address ("Sending failed because of invalid destination addresses")
Have fun
---markus---
> On 27 Apr 2019, at 17:23, Theodore Petrosky <email@hidden> wrote:
>
> When I did this with my exchange server, I had to configure the exchange
> server to allow connections from the WO box.
>
> Also, when I am in development mode (ie. a devel laptop with DHCP) I
> configure the DHCP server to assign a specific IP to this machine (assigned
> to the MAC address of the development machine).
>
> Again it’s so the mail server can accept (maybe relay) mail.
>
> Ted
>
>> On Apr 27, 2019, at 8:45 AM, Markus Ruggiero <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> When I try to send mail I get that weird error and mail fails. Why would the
>> receiver address be rejected? I never had problems so far. Anyone can spot
>> something I miss? I am sending from the development machine which has a
>> local DHCP address and thus no fully qualified host name, but the error
>> mesage suggests that the receiver address is bad. DNS is working.
>>
>> 220 miniserver.rucotec.ch <http://miniserver.rucotec.ch/> ESMTP Postfix
>> DEBUG SMTP: connected to host "miniserver.rucotec.ch
>> <http://miniserver.rucotec.ch/>", port: 25
>>
>> EHLO 192.168.56.46
>> 250-miniserver.rucotec.ch <http://250-miniserver.rucotec.ch/>
>> 250-PIPELINING
>> 250-SIZE 20971520
>> 250-VRFY
>> 250-ETRN
>> 250-STARTTLS
>> 250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5
>> 250-ENHANCEDSTATUSCODES
>> 250-8BITMIME
>> 250-DSN
>> 250-SMTPUTF8
>> 250-BINARYMIME
>> 250 CHUNKING
>> DEBUG SMTP: Found extension "PIPELINING", arg ""
>> DEBUG SMTP: Found extension "SIZE", arg "20971520"
>> DEBUG SMTP: Found extension "VRFY", arg ""
>> DEBUG SMTP: Found extension "ETRN", arg ""
>> DEBUG SMTP: Found extension "STARTTLS", arg ""
>> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN CRAM-MD5 DIGEST-MD5"
>> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
>> DEBUG SMTP: Found extension "8BITMIME", arg ""
>> DEBUG SMTP: Found extension "DSN", arg ""
>> DEBUG SMTP: Found extension "SMTPUTF8", arg ""
>> DEBUG SMTP: Found extension "BINARYMIME", arg ""
>> DEBUG SMTP: Found extension "CHUNKING", arg ""
>> NOOP
>> 250 2.0.0 Ok
>> DEBUG SMTP: use8bit false
>> MAIL FROM:<email@hidden <mailto:email@hidden>>
>> 250 2.1.0 Ok
>> RCPT TO:<email@hidden <mailto:email@hidden>>
>> 504 5.5.2 <192.168.56.46>: Helo command rejected: need fully-qualified
>> hostname
>> DEBUG SMTP: Invalid Addresses
>> DEBUG SMTP: email@hidden <mailto:email@hidden>
>> DEBUG SMTP: Sending failed because of invalid destination addresses
>> RSET
>> 250 2.0.0 Ok
>> DEBUG SMTP: MessagingException while sending, THROW:
>> javax.mail.SendFailedException: Invalid Addresses;
>> nested exception is:
>> com.sun.mail.smtp.SMTPAddressFailedException: 504 5.5.2
>> <192.168.56.46>: Helo command rejected: need fully-qualified hostname
>>
>> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2064)
>> at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1286)
>> at er.javamail.ERMailSender._sendMessageNow(ERMailSender.java:245)
>> at er.javamail.ERMailSender.run(ERMailSender.java:389)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 504 5.5.2
>> <192.168.56.46>: Helo command rejected: need fully-qualified hostname
>>
>> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1964)
>> ... 4 more
>> Apr 27 13:40:09 SampleRegistration[13010] ERROR er.javamail.ERMailSender -
>> Can't send message: <er.javamail.ERMessage To: email@hidden
>> <mailto:email@hidden>>
>> SMTPAddressFailedException: 504 5.5.2 <192.168.56.46>: Helo command
>> rejected: need fully-qualified hostname
>> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1964)
>> at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1286)
>> at er.javamail.ERMailSender._sendMessageNow(ERMailSender.java:245)
>> at er.javamail.ERMailSender.run(ERMailSender.java:389)
>> ... skipped 1 stack elements
>> Apr 27 13:40:09 SampleRegistration[13010] DEBUG NSLog - url
>> /cgi-bin/WebObjects/SampleRegistration.woa/_wr_/wodata=/Developer/SourceDistributions/WonderSource/Framewo
>>
>> Confused....
>> ---markus---
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden