SMTP fails to recognize email address

Hi there,
i'm having a tough and irritating problem: when i create Transport from the Session in tomcat's (v 5.5) context, i get the following Exception:
SMTPAddressFailedException: 550 5.1.1 Bad destination mailbox address ([email protected])
i went google but with no success as well as nothing in java forums..
Interesting thing is that on my localhost it works fine, but when uploaded to remote server it fails (context.xml has the same settings). Here is my code:
Context initCtx = new InitialContext();
               Context envCtx = (Context) initCtx.lookup("java:comp/env");
               Session session = (Session) envCtx.lookup("mail/Session");
               System.out.println(session.getProperty("mail.smtp.auth"));
               Message message = new SMTPMessage(session);
               message.setFrom(new InternetAddress(from));
               message.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress(to.trim()));
               message.setSubject(subject);
               message.setContent(text, "text/plain;charset=windows-1257");
               Transport service = session.getTransport("smtp");
               service.connect();
               message.saveChanges();
               service.sendMessage(message, message.getRecipients(Message.RecipientType.TO));
               service.close();
.. and context.xml for application:
<?xml version="1.0" encoding="UTF-8"?>
<Context
reloadable="true"
workDir="......">
<Resource
name="mail/Session"
type="javax.mail.Session"
mail.smtp.host="mail.takas.lt" mail.debug="true"/>
</Context>
Any help, please?? Would appreciate it alot.
Ramunas

i guess that is not a problem, because the deny comes from the smtp server for recipient address which is correct, eventhough the sender (From) email is incorrect and mail server accepts it. Here's some debug output, maybe it could help?
MAIL FROM:<[email protected]>
250 2.1.0 [email protected]...Sender OK
RCPT TO:<[email protected]>
550 5.1.1 Bad destination mailbox address ([email protected]).
DEBUG SMTP: Invalid Addresses
DEBUG SMTP: [email protected]
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Resetting
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 Bad destination mailbox address
the code 550 is response from smtp host, not the remote pc..

Similar Messages

  • Why is Mail asking me for the name of an smtp server for an email address that doesn't exist?

    I've migrated from Snow Leopard to Mountain Lion on a new Mac, but in trying to use Mail on ML, it keeps asking me for the name of an smtp server for an email address that's never existed. The addy has my user name correct, but the server part of the address doesn't exist, or at least I've never used an email address with that provider. On ML there's no plist file for Mail, so nothing to delete there. What else can I do to get Mail working? The only other option I have is to abandon Mail as being crippled and useless, and use Postbox, which for it's price (US$9.95) is an attractive option. OTOH, I've paid for Mail after all, so it really ought to work. Any clues as to what I can do to stop its nonsensical behaviour? How do I file a bug report?
    TIA.
    Pauline

    Amasis wrote:
    On ML there's no plist file for Mail, so nothing to delete there.
    ~/Library/Containers/com.apple.mail/Container.plist
    (Go to your Finder "Go" menu hold the option key to choose "Library", since the ~/Library is hidden on ML)

  • Server doesn't recognize email address

    I can recieve email, but I can't send email.  It keeps saying "server doesn't recognize email address."

    Ok,
    I have it working finally.
    On a whim, I tried deleting the iCloud account (again) and reinstated it.
    I set it up using [username]@me.com, and all is well.
    This is the 2nd time i set it up this way, so I would suggest trying it again, if you have already.
    Ian

  • After upgrading to Yosemite, Thunderbird does not recognize email addresses: "syntax error" in recipient address. Fix?

    After upgrading to IOS Yosemite, Thunderbird will no longer send emails to the contacts in my history file that drops down when I "write" a new message. I continue to get a return response that there is a syntax error in the address field of the message although I have tried both my stored emails and manually typed email addresses. What has been changed and how do I recover the use of Thunderbird's great program?
    By the way, how do I eliminate out of date email addresses from popping up and populating email responses rather than the most current ones that are in my contacts? I now have to type each one in separately as the default options that come up are many out of date.
    Thanks much for your great work. Mozilla and Firefox are the best.

    Did you find a solution to this issue?  My mail server is doing the same thing.  I've tried six migrations now, and have a couple of tickets open, but they all have issues.  I have worked around all of them except the mail server problem.
    I did some more digging; the problem appears to be that on a migrated server, it leaves all of your mail store in the old location, doesn't move it, and then doesn't appear to upgrade spam-assassin properly.  The net effect is that the mail server gets the SMTP communication, tries to pass the message into spam assassin, and then it goes south.
    I see errors like this littered in the logs:
    Jul 31 13:53:10 mail org.amavis.amavisd[5927]: bayes: cannot open bayes databases /var/amavis/.spamassassin/bayes_* R/O: tie failed:
    Jul 31 13:53:10 mail org.amavis.amavisd[5927]: bayes: cannot open bayes databases /var/amavis/.spamassassin/bayes_* R/O: tie failed: No such file or directory
    Do you see anything similar?

  • Mail doesn't recognize email address I'm sending to

    I'm trying to send an email to a group in my address book but whenever I try to send it I get the error message:
    "The server “smtp.mac.com” did not recognize the following recipients:" and then lists most of the email addresses I'm sending to.
    I don't think I could have that many of the email addresses wrong, so I have no idea what's wrong. Does anyone have any advice?

    {quote}
    I've got the same problem. Is there a way to turn this off?
    Unfortunately, the ISP's have been catching so much flak for spewing spam that they have resorted to methods to protect their reputations regardless of how you want to work.
    The most obvious spam in the world is a message with a large number of recipients.
    PC users can not be trusted by their ISP's because their machines are infested so often with programs designed to spread spam.
    If an ISP is accused of sending too much Spam they run the risk of getting dumped to the "Black Hole" by other ISP's and that damages the ISP's ability to do business. Hence the reason for the ISP's to get involved. They never cared much before now, until it started affecting their business.
    So, because of the trash and bull that's been going on with the Trojan Programs on Windows machines for the last 4 years, I don't think you can do much, except to try other mail servers that may not interfere with your messages. If you get your own domain on a host, you own the mail server. Maybe that's an answer...

  • Server does not recognize email address

    I have both an iphone and an ipad until today I was able to send emails from both units using my household internet connection, today when I try to send an email from my ipad I get a pop-up stating server does not recognize the email address, but I can send emails from my iphone using the same internet connection. When I checked the settings both units have the same. Two days ago both units were updated.

    Both devices are using the Home Network. My ISP is  Shaw in Canada. and they will only accept sent email from their subscriber households, for example if I try to send an email from my iphone via 3g it will not be recognized, but will be ok if sent using wi fi at home. I was able to send email prior to doing the last update.

  • 10.7 SMTP Mail Logs send email address- Assign Postmaster?

    How do you assign the SMTP mail log email address? I received an email this morning from another System Administrator (who previously administered this server), that he received the following message (I should be receiving these notifications, not him. To add: I was already the "Alert Email Address." Is there another location, where the SA's email address is set?):
    From: Mail Delivery System
    Subject: Postfix SMTP server: errors from server2.domain.com
    Date: September 23, 2013 6:05:43 AM EDT
    To: Postmaster
    Transcript of session follows.
    Out: 220 server.domain.com ESMTP Postfix
    In:  HELO XXX.XXX.XXX.XXX
    Out: 250 server.domain
    In:  STARTTLS
    Out: 454 4.7.0 TLS not available due to local problem
    In:  QUIT
    Out: 221 2.0.0 Bye
    For other details, see the local mail logfile

    I am having the same problem. I also can't send anything with attachments at all. Mail Just hangs there endlessly. This is a HUGE problem for me right now, and I don't feel like using entourage mail because it is not really reliable either. Does anyone know how to get a direct hold of Mac Telephone Support or engineering? I need to fix this problem like right now. We need to go back one level of code. Mr. Logic... This is my third day since I downloaded this code revision too, so please let me know what you find out, and I will do the same for you. I should have known better than to install this code without reading up on the issues and fixes.
    [email protected]
    Since downloading the 10.4.7 update I've experienced
    the mail problem wherein emails can't be sent to the
    smtp server. I've read all the discussions on all
    the various fora, and tried all the fixes (e.g.
    downloading the combo update instead, trashing mail
    preferences, repairing permissions, setting up mail
    again from scratch, looking for the SOCKS proxy,
    resetting the PRAM, etc. etc. etc.) but all to no
    avail.
    Note that in my case the SOCKS proxy checkbox was
    NEVER ticked/checked and so I couldn't uncheck it
    (which was the fix that seems to have worked for most
    people).
    Anyway... last night I thought would try setting the
    SOCKS proxy checkbox myself, so that I could then
    uncheck it. (you never know!)
    However, when doing this I noticed that any changes I
    made to the proxy checkboxes in the Network system
    preference panel ARE NOT SAVED.
    i.e. If I tick one or more of them and Apply the
    changes, then exit the Network Preferences panel, the
    relaunch the Network Preferences panel, they are all
    UNCHECKED again.
    Is this related to my Mail problem? Any clues?
    This is my 3rd day without the ability to send email
    from the Mail client in 10.4.7. Not good.
    Any help/suggestions appreciated.
    Mr Logic.
    Powerbook G4   Mac OS X (10.4.7)  

  • Trying to set up a group email "RAM" that will contain multiple email addresses.  Receive error messages "check SMTP settings" or "Invalid email address" when I try to send a message to the group.

    I am trying to set up the group email "RAM" that will contain multiple email addresses.  I have inputted the name "RAM" as a corporation.  In the section labeled "Email" I have inputed multiple email addreses so that when I want to send an email to the group "RAM" I just have to input the name "RAM" in the section labeled "To" , input the Subject in the Subject box & the email will be sent to the multiple addresses, yet when I do I receive either one of two error messages being "Invalid Email Address" or "Check SMTP settings" each of which allows me the option of with cancelling the email or send it anyway.

    Bump. I'd like to know, too. I even have some synched Groups from my Apple Address Book I email to using Apple Mail on the Powerbook, but I can't see how to do a group mailing on the Touch either.
    In normal Mail, I just start typing the name of the group, and it autocompletes, I hit return, and it fills in all addresses in the Group.

  • SMTP name for my email address is incorrect but I don't know how to correct it. Help!!

    Two of my email address seem to have been joined. When I attempt to send an email from the problem address I am asked for my password but the ID listed in the SMTP request shows jerrhrt27 when the real address is jerryeg27. No idea of how it was changed or where I can correct it. This is a yahoo email address and I can send emails from there with no problem.

    you have now created a second smtp and both have correct
    UserName that is the same as the email address they are used by.
    Check the saved passwords to see if there is an inccorrect setting saved.
    Tools > Options > Security > Passwords tab
    * click on 'Saved Passwords'
    * There should be two smtp entries. How many do see?
    * Is there an smtp:// setting for the Wrong UserName?
    * If yes, then select it and click on 'Remove' and then click on 'Close'
    Then check the config Editor settings.
    * Click on 'Advanced' > 'General' tab
    * Click on 'Config Editor' button
    * It will tell you to be careful.
    * In top search type: jerryhrt27
    * What is shown in the list?
    * Please post an image of the results.
    Close window - top right X.
    click on OK to save and close Options.

  • Mail does not recognize email address for Address Book marked as "Company"

    I have a bunch of Address Book entries with "Company" checked and no first or last name. After the SL upgrade, entering the name of the company into an email in Mail.app does not result in it recognizing the company as a contact, or using the saved email address. Oddly, if I edit the contact so that it has a first and last name, even if Company remains checked, Mail will come up with the correct address. Any explanation or work around for this?
    I also noticed that all of such contacts, after the SL upgrade, no longer had the Company box checked, resulting in them all being listed as "No Name" -- but I fixed that by rechecking all of the boxes.

    Hi murrxx,
    Based on my experience, it just cannot send to the un-recognized email address. The remaining recipients will recieve the email.
    Please changing to OWA to verify whether all the mails cannot be sent.
    If in OWA, just the un-recognized email address cannot be sent, it should be an issue on the Outlook Client side.
    Please run Outlook under safe mode for testing.
    Also try to re-create new profile to refresh the caches.
    Is there NDR returned back to us when we cannot send emails to all?
    If has, please post the details.
    Please also collect some related event logs for the further troubleshooting.
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • IMessage doesn't recognize email addresses

    Hello,
    I'm having trouble sending iMessage messages to my contacts.  Their email addresses aren't read as the ones registered to iMessage even if they are the Apple IDs.
    I need to wait for someone to initiate an iMessage conversation before I can write them.  Please help.  Thanks

    Thanks, ckuan.
    Actually, I noticed that my gmail contacts register as imessage-able.  I verified with my Yahoo! contacts and they say theyre using the correct yahoo! email address for their imessage.  Does it take longer for Yahoo! to be verified as an iMessage device?

  • Exchange account doesn't recognize email address

    I recently got a new work email address using the new .brussels domain extension (instead of the old .be). For some reason OSX Yosemite doesn't accept this e-mail address when I set up my new Exchange account info. I had the same problem on my work PC but our IT guy managed to make Windows understand that .brussels is a perfectly normal email address. Is there any chance to make OSX accept the new (and a bit unconventional) domain extension?

    {quote}
    I've got the same problem. Is there a way to turn this off?
    Unfortunately, the ISP's have been catching so much flak for spewing spam that they have resorted to methods to protect their reputations regardless of how you want to work.
    The most obvious spam in the world is a message with a large number of recipients.
    PC users can not be trusted by their ISP's because their machines are infested so often with programs designed to spread spam.
    If an ISP is accused of sending too much Spam they run the risk of getting dumped to the "Black Hole" by other ISP's and that damages the ISP's ability to do business. Hence the reason for the ISP's to get involved. They never cared much before now, until it started affecting their business.
    So, because of the trash and bull that's been going on with the Trojan Programs on Windows machines for the last 4 years, I don't think you can do much, except to try other mail servers that may not interfere with your messages. If you get your own domain on a host, you own the mail server. Maybe that's an answer...

  • Reply All fails on ";" separated email addresses

    I get emails from my boss in which email addresses are separated by a ";".
    eg. [email protected];[email protected];[email protected]
    When I try to "Reply All" from Apple Mail application, it shows an error as "Invalid email address". However on my webmail account, these addresses are recognized and converted to email addressed separated by ",".
    Anyway I can over come this problem?

    I do not have a separate Mac that I can access. But I created a new account on my MacBook and tried sending email with two email addresses separated by ";"
    eg. [email protected];[email protected]
    And Mail gave error of invalid address. Please help.

  • Optimum Online does not recognize email addresses for sending mail

    We just got the new iMac for our family. I decided to junk eudora and use apple's mail client. I have 3 accounts: mine (admin), my wife, my son. My wife and son can both receive mail via Mail but they cannot send. My son gets "This message could not be delivered and will remain in your Outbox until it can be delivered. The server "mail.optonline.net" rejected the address "Gregory Sohanchyk" " I reinstalled eudora so my son can send and receive. Queried cablevision but have yet to receive a response. Any one else having problems with other accounts and cablevision and optimum online.

    Pull your mail plist from ~/Library/Preferences

  • BODS 3.1 :SMTP configuration to send email for success or failure of job

    Hi.
    This is further to this post : http://forums.sdn.sap.com/thread.jspa?threadID=1965129&tstart=0
    Thanks to all for the help.
    I did not find a complete set of information as things to do (for a person who is new to BODS).
    Hence sharing the workflow which works for me when tested on a simple workflow  :
    Pre-requisite : SMTP service to be made available on the BODS server and port 25 to be opened up.
    This is done by the IT dept of the company.
    When smtp service is activated and port 25 is opened up, telnet IP address 25 should say, service is available.
    Suggestion : create a email group like : bods at company.com which can be used to be used for the BODS JOBs. Which does not prompt for a password. This also is done by the IT dept of the company.
    1) On the BODS server :
    1) Click open Data Services Server Manager
    2) SMTP settings for smtp_to functions :
    Add the IP Address of the SMTP server
    Add the email address of the sender. Eg. bodsjobs at companyname,com
    3)Apply/Restart the server.
    2) Login to BODS Designer :
    Create a test job :
    TRY ==>DF===> Script for success ===> CATCH script for failure
    In the script for success : add the following :
    print (' IN TRY BLOCK Before email ' );
    smtp_to('bodsjobs at abc,com', ' SUCCESS OF JOB  :  '
    || job_name(),'Job completed successfully ', 0, 0);
    print('After Email ');
    In the script for Catch add the following :
    print (' IN CATCH BLOCK Before email ' );
    smtp_to('bodsjobs at abc,com', 'FAILURE OF JOB : '
    || job_name(),
    error_number( ) || 'Error message: ' || error_message( ) ||
    'check details', 50, 50);
    print('After Email ');
    Note : In the catch : select all exceptions on the check box.
    Save all.
    Click on the job and say execute.
    The job will run and if it is successful. You will receive the succes mail.
    If there is any error in the DF before the catch, you will receive a mail, which says failure.
    The above workflow, when tested atleast works for me.
    Hope this  helps.
    Regards
    indu

    Hi Arun.
    Am really not aware as to how to make things work from the console.
    I work on windows environment both at client and on the server.
    It looks like you got a bit confused on suggestion of a email group account.
    I never did anything on outlook configuration for activation of smtp for bods.
    I think you should not mess with outlook.
    I dont know from the client side how things work.
    But i have worked directly on the BODS server where the bods installation was done.
    It is relatively very simple to do and to test.
    But to even test why you get that error.
    All you need is just a email id. Which could be yours ???
    Put your email id as the source of email in that box in the job server.
    And put only your email id in smtp_to and test it.
    Run a test job. If it completes successfully. You will receive a mail.
    In the catch, if you have checked all the boxes for error capture,
    if the job fails, it would throw a dump of the errors in the email.
    Once everything works well and you receive emails for any jobs you are running.
    Then you could decide for the source of your email id and for the receipients of your emails of the jobs.
    You could put a group id of your team as source. And also in smtp_to script in case you want everyone to receive the alert that the job has been done or it has errors.
    Or include only those email ids in the smtp_to whom you feel, should receive the mail.
    Hope this idea helps.
    Please dont mess with outlook for any smtp activation for bods.
    It is not required if you are working on a windows environment.
    You just need a email id for testing.
    Outlook configuration does not come into picture at all.
    if there is any other unix environment involved. I have no idea.
    And i really do not know how things would be from a client side to configure.
    Server configurations i do from the server.
    I did all configurations on the main server machine. Not from the client.
    And I have only one job server so i did everything there.
    I did not do anything from management console.
    I use management console only for monitoring of jobs on a daily basis, the dashboard which gives you details of the data pulled, time taken etc etc.
    cheers
    indu.
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:05 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:09 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:17 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:18 AM

Maybe you are looking for

  • Remote key for lookup tables

    Hi, I need some advice on remote keys for lookup tables. We have loaded lookup data from several client system into the MDM repository. Each of the client system can have diffferences in the lookup values. What we need to do is to enable the keymappi

  • File save as

    What happened to file save as . . . ? Now we have this silly duplicate nonsense and then after the duplicate command I have to save to rename it etc. Any extra mouse click for what !!!! Any ideas anybody - Maybe I'm doing something wrong here. Thanks

  • Improving Write to Measuremen​t File Rate

    Hello again everyone, I was wondering if I could once again get some help with my VI which is dealing with data aquisiton, display and logging. I'm attempting to display and record all the data that is incoming serially from some external ADC boards.

  • Problem in softwere update

    I clic on my softwere update icon, after show new version for my N8, but i try to instal new version, its 30 MB new version to improov my N8, But its only show in my softwere update, how can i instal new vesion,

  • Row wise initialization

    Hi, Can anyone explain how row wise initialization works in OBIEE in steps wise. Thanks, Lakshmipathi.