• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Mail Api : unable to send mail

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I have written a service to send mail
it is using java mail api.
I am able to send mail from following id (using the services )
gmail to yahoo mail , "abcd" mail( my company )
and from yahoo to gmail , "abcd" mail ,
"abcd" to gmail and yahoo mail
BUT unable to send mail to "XYZ".com
The postmaster of "XYZ".com is giving following information

This is an automatically generated Delivery Status Notification.



Unable to deliver message to the following recipients, due to being unable to connect successfully to the destination mail server.

lmn.@"XYZ".com




Final-Recipient: rfc822;lmn.@"XYZ".com
Action: failed
Status: 4.7.1
Diagnostic-Code: smtp;450 4.7.1 Client host rejected: cannot find your reverse hostname, [124.153.77.24]


---------- Forwarded message ----------
From: pqr@"abcd".com
To: lmn.@"XYZ".com
Date: 11 Jun 2010 10:53:14 +0530
Subject: Please Reply if you get this mail
Testing Email module from "abcd" Technologies jun 11 2010 11am

And some times it is giving message :

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

lmnop.@"XYZ".com




Final-Recipient: rfc822;lmnop.@"XYZ".com
Action: failed
Status: 5.1.1
Diagnostic-Code: smtp;550 5.1.1 <lmnop@"XYZ".com>: Recipient address rejected: User unknown in virtual alias table


---------- Forwarded message ----------
From: ccportal@mycard.co.in
To: lmnop@"XYZ".com
Date: 18 Jun 2010 11:11:16 +0530
Subject: New SR for your action(CC1806100003 Registered)
Service Request::CC1806100003 Created on::June 18, 2010 11:11:16 AM GMT+05:30

Requested Comment::customer wants to register his points , product was purchased on 15 of June from Next



We are using Windows Server 2003
Please check the code below

Thank You



[edit: code tags, removed big fonts and bright colors]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

Also, avoid color except for emphasis. Making your posts hard to read will not help your cause.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The very first error message hints pretty strongly at the problem:

Unable to deliver message to the following recipients, due to being unable to connect successfully to the destination mail server.

lmn.@"XYZ".com


Domain names can't contain quotation marks.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Also, avoid color except for emphasis. Making your posts hard to read will not help your cause.


Fixed.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:The very first error message hints pretty strongly at the problem:

Unable to deliver message to the following recipients, due to being unable to connect successfully to the destination mail server.

lmn.@"XYZ".com


Domain names can't contain quotation marks.


can you please explain solution in detail
Thanks
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what to explain - the error message says that the email address contains double quotes, which isn't allowed, especially not as part of the domain name.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Arvind Purohit wrote:can you please explain solution in detail


Remove the quotation marks.
 
Arvind Purohit
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:

Arvind Purohit wrote:can you please explain solution in detail


Remove the quotation marks.




Quotation is not there in actual code, here it is written to just emphasize that mail is not going to a particular domain name say "xyz"
Thank you
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that was a waste of time then: AvoidRedHerrings

Also, are you the same person as "prasenjit.svnit das"? If so, tell us which account you want to keep so that we can close the other.

The next thing to check into is this:

Diagnostic-Code: smtp;450 4.7.1 Client host rejected: cannot find your reverse hostname, [124.153.77.24]


Some mail servers do this if the machine that sends the mail does not have a DNS MX record for the domain for which they're sending the mail; it's an anti-spam measure. There isn't much that can be done about it, except for moving the mail sending process to a machine that does have an MX record.
 
Arvind Purohit
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Well, that was a waste of time then: AvoidRedHerrings

Also, are you the same person as "prasenjit.svnit das"? If so, tell us which account you want to keep so that we can close the other.

The next thing to check into is this:

Diagnostic-Code: smtp;450 4.7.1 Client host rejected: cannot find your reverse hostname, [124.153.77.24]


Some mail servers do this if the machine that sends the mail does not have a DNS MX record for the domain for which they're sending the mail; it's an anti-spam measure. There isn't much that can be done about it, except for moving the mail sending process to a machine that does have an MX record.


We are not same , but we are working in same project.
sir want to know is there any bug in our program or it it server configuration problem,
We have administrative privileges of the mail sending server( windows 2003 ), can we edit DNS max record to solve this problem and we can do it ?

Thanks
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, your network admin can change the DNS settings of servers. (It's not called "max" record, BTW, it's called "MX" record. Also make sure that it has an A record.)
 
Arvind Purohit
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Yes, your network admin can change the DNS settings of servers. (It's not called "max" record, BTW, it's called "MX" record. Also make sure that it has an A record.)


Now it is giving Error :
postmaster@"xyz"
to akpt@abcd.com
date Tue, Jun 22, 2010 at 1:09 PM
subject Delivery Status Notification (Failure)
hide details 1:09 PM (20 hours ago)
This is an automatically generated Delivery Status Notification.

Unable to deliver message to the following recipients, due to being unable to connect successfully to the destination mail server.

lmn@"xyz".com




Final-Recipient: rfc822;lmn@"xyz".com
Action: failed
Status: 4.7.1
Diagnostic-Code: smtp;450 4.7.1 Client host rejected: cannot find your reverse hostname, [124.153.77.24]


---------- Forwarded message ----------
From: akpt@"abcd".com
To: lmn@"xyz".com
Date: 22 Jun 2010 12:24:51 +0530
Subject: This is testing frm incture 22 jun
testing new server config and chnged in server reporting time to 40 min
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean, "now"? That's the exact same error message as before, isn't it? What have you changed since then?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now, are *these* quotation marks actually there? If they're not, you're being *really* misleading and wasting our time. If they are... then what's putting them there if you're not?
 
Arvind Purohit
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Now, are *these* quotation marks actually there? If they're not, you're being *really* misleading and wasting our time. If they are... then what's putting them there if you're not?



SORRY MY MISTAKE
reply
    Bookmark Topic Watch Topic
  • New Topic