Difficulty sending mail to secure SMTP, SMTPAddressFailedException: 554

I keep getting the following exception in my application:
class com.sun.mail.smtp.SMTPAddressFailedException: 554 <[email protected]>: Recipient address rejected: Relay access denied
My code is as follows:
public class SMTPSender {
     private Session session;
     public SMTPSender() {
          Properties props = new Properties();
          props.setProperty("mail.smtp.host", AutomailingUtility.HOST);
          props.put("mail.smtps.auth", AutomailingUtility.AUTH);
          props.put("mail.smtp.port", "465");
          props.put("mail.smtp.socketFactory.port", "465");
          props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
          props.put("mail.smtp.socketFactory.fallback", "false");
          Authenticator auth = new MyAuthenticator(AutomailingUtility.USERNAME, AutomailingUtility.PASSWORD);
          session = Session.getInstance(props, auth);
     public void sendMessage(String toUser, String message, String subject) {
          try {
               Message msg = new MimeMessage(session);
               msg.setSubject(subject);
               msg.setSentDate(new Date());
               InternetAddress ia = new InternetAddress(AutomailingUtility.FROM_ADDRESS);
               msg.setFrom(ia);
               msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toUser + "@mail.gatech.edu"));
               msg.setText(message);
               Transport.send(msg);
          } catch (AddressException e) {
               e.printStackTrace();
          } catch (MessagingException e) {
               e.printStackTrace();
}All the Automailing constants are strings.
I'd appreciate the help

The code? For regular SMTP with authentication I believe you needprops.put("mail.smtp.auth", "true");whereas you set up the mail.smtps.auth property instead. However I don't have any experience with secure SMTP, so I don't know what's right in that case. Are those other applications you mention using secure SMTP or just regular SMTP?

Similar Messages

  • Unable to send mail via Secure SMTP

    Our email system allows users access to their accounts via secure IMAP and SMTP.
    I am able to connect and view my inbox via secure IMAP, using a number of different S60 devices - namely E72, E52 and 5800.
    However I am unable to connect to send via secure SMTP.
    By contrast, I am able to view and send mail with Apple and Android devices without any problems.
    On my comparable UAT configuration the S60 devices do not have this problem.
    On UAT, we use a self-signed certificate, as opposed to the Live system which uses a Verisign certificate.
    Help, please!
    I'd like to be able to send mail with my S60 devices.
    How can I resolve this apparent problem with the certificate?
    Echo

    An Update of sorts.
    On my E72 I removed all references to Verisign under: Ctrl. panel -> Settings -> General -> Security -> Certificate management -> Authority certificates. (There were about 6 entries)
    I tried to connect afresh, but the phone took two attempts to pick up my password for email.
    I now have a 'Trusted site certificate' for the email server.
    However, I still can't send.  A message pops up 'Unable to send message: <target address>'

  • By trying to send mail with yahoo smtp, i got " connexion lost" What to do?

    since firefox 3.04, it is impossible to send mails via Yahoo smtp servor : error message "connexion lost"
    == This happened ==
    Every time Firefox opened
    == urgrading

    I changed the connection security in Thunderbird from SSL/TLS to STARTTLS for the Yahoo SMTP account and I can now send mails without problem with the Eset IMAP checking enabled. Problem solved. Thank you

  • Can't Send Mail Via HughesNet SMTP Server

    After installing 10.5 I find that I can receive mail from my ISP (HughesNet) but I can't send mail through the smtp server. I've tried every setting possible and even duplicated the settings off my wife's 10.4.10 iMac and I still can't send mail. All I see is that the smtp service is "Offline."
    Fortunately, I have a .Mac account so I can send mail using that smtp server. But I'd like to be abel to use my HughesNet server.
    Does anyone have any suggestions?

    My mom uses RoadRunner by Time Warner. She was able to receive email using Leopard and Mail but not send. SMTP server was the big problem like everyone else here experienced. We finally were able to get it to work using many ideas here. What we did:
    1) Delete com.apple.mail.plist from the User/Library/Preferences folder (BACK UP YOUR EMAIL FIRST)
    2) Open Mail and create a new account but disable the automatic set-up feature, put your info in manually.
    3) Uncheck " Use only this server" from the outgoing mail
    4) Under the Advanced tab on Mail Prefs "port set to 25", Uncheck "SSL" box, and uncheck "Use Authentication"
    5) Now hit Create
    It took Mail about 20 minutes to contact the SMTP server, but it did and now I can send and receive Mail without any problems on her computer.
    Bad Apple...stop criticizing MS and Vista when your own house is not in order yet. Hope this helps someone out there.....

  • Write error. [Error sending mail message to SMTP server. Return code: [].]:

    Hi ,
    I am getting the below error when scheduling a report which is larger in size in excel format.
    write error. [Error sending mail message to SMTP server. Return code: [].]: [CrystalEnterprise.Smtp]  
    The same error does not come up when sending the same report in XLS format using outlook.
    Can some one confirm if this error is because of the size of the report as I see a different error in XIR2 incase the size the exceeds the email server limit.
    ~Neethi

    Hi,
    this could be
    Maybe you have different limits for service smtp account (which the BO Server should use) and User smtp accounts.
    Thats why you can sent it via outlook and not from the BO Server.
    Regards
    -Seb.

  • Write error. [CrystalEnterprise.Smtp]: [Error sending mail message to SMTP

    Hi,
    The below error messgage i am getting while scheduling report in CMC. My report getting refreshed successfully but while posting refreshed file(Excel) it is not posting and throwing below error.
    Error Message:
    write error. [CrystalEnterprise.Smtp]: [Error sending mail message to SMTP server. Return code: [].]
    please provide some help on this.
    Thanks
    Vivek

    Hi Vivek
    Mails to the destinations are delievered by SMTP server. Size of the file in the mail depends on the SMTP server.
    For example, If SMTP server does not permit file size more than 2MB then that file won't be delievered.
    For testing purpose copy the instance generated in Filestore to your local drive and send this instance using your mail client to
    desired destination.
    You can try sending large size file from your mail client to test SMTP server capacity of sending large size file.
    Thanks,
    Hrishikesh Parasnis

  • TS3276 I just upgraded to 10.8.2 and Mail is having a problem. It won't remember my password for getting mail; but it does remember the password for sending mail, i.e., smtp. Does anyone know of a fix?

    I just upgraded to 10.8.2 and Mail is having a problem. It won't remember my password for getting mail; but it does remember the password for sending mail, i.e., smtp. Does anyone know of a fix?

    The solution surprised even me, and we've been using Macs since 1984 (still have an original 128K).
    I contacted Apple support, and because we had just upgraded yesterday, clicked on the "exception" button as opposed to paying the $19.99 one-time support fee. An Apple tech called and the problem was solved in two minutes.
    Somehow during the installation of OS 10.8.2 (over 10.6.x) the key chain data for my email ISP login password got corrupted. The solution was to delete both the POP mail and SMTP entries in my keychain.
    Back to Mail, it asked for the POP password, I entered it and bingo, mail got busy downloading. Interestingly, the password was also entered into the SMTP panel.
    So, that's it. Thanks for you response, Mr. Hoffman, and regards.

  • CANNOT SEND MAIL FROM .MAC SMTP ACCOUNT

    Hello everyone--
    I can receive mail from my .mac account and have done extensive troubleshooting including:
    1. Changing ports from 25 to 587
    2. Deleting and re-installing mailbox
    3. Reading a hosts of topics
    4. I have the serving settings with SSL unchecked
    ...but this still giving me the same trouble. I cannot send out because my email address keeps getting rejected.
    Any suggestions? Thanks!

    Are you also accessing an email account and SMTP server in Mail that is provided by your ISP used for connecting to the internet?
    If so, can you send mail with this account and SMTP server?
    If the answer is yes to both questions, select/use your ISP's SMTP server to send mail with your .Mac account which is invisible to all recipients.
    Most, if not all ISPs now block the use of SMTP servers outside of their network on Port 25. Some ISPs allow the use of an authenticated SMTP server only (such as the .Mac SMTP server) that is outside of their network on Port 25 but some block its use regardless.
    Changing the Port for the SMTP server that is outside of the ISP's network from 25 to 587 usually resolves it but sometimes not depending on the ISP's restriction.
    Have you contacted your ISP regarding their restrictions and/or requirements when using an SMTP server that is outside of their network or not provided by them?
    Using your ISP's SMTP server to send mail with your .Mac account should work and it may be required regardless.

  • Can't send mails (POP account/SMTP)

    Okay, this issue has been posted before, but none of the difficulties or possible solutions described seemed to match my problem, which is:
    When I click the "send" button in Mail, it simply does *nothing at all*. It doesn't even seem to try to do anything, let alone give me an error message.
    I used to have an iBook with OS X 10.2, and Mail has always worked perfectly fine on that system. Now I just bought a new iBook with Tiger installed. I first updated to 10.4.6, then transferred all my data, including my mail settings and mailboxes, to the new computer, with the result that I can receive mail, but I can't send e-mails. I tried deleting my account and creating a new one, but that didn't change anything. I can send e-mails through my provider's webmail system, so the SMTP server isn't broken down; anyway, my husband is using the same server, and he can send mails, so I guess it's somehow an issue with my computer and not with the provider. My account settings are definitely correct. I can "ping" the mail server. I tried deactivating my firewall, but that wasn't the solution either.
    What else could I try? My outgoing mail server is an ordinary port 25 password-protected SMTP server. I strongly suspect that the problem is with 10.4.6, but I'm not exactly keen on the hassle of downgrading my system back to 10.4.5 or whatever... Or is there an easy way to do that?
    Any other ideas? I'd be really grateful. Not being able to send mails *****.
    -Johanna

    Hi Johanna,
    Have you tried the Activity Viewer? (Window > Activity Viewer in the menu.) Try sending an email, and see if any error message appears in the Activity Viewer window after you click "Send".
    Matt

  • Sending mail regardless of SMTP-server.

    Hallo
    A lot of my friends who - unfortunantely uses PC - can send mail regardless of where they are situated and they dont have to change there SMTP-settings. I´ve tried to make it work by making the same settings as I use for outgoing mail and asked my mac use my password. But it doesnt work:-(... Can anybody explain this? What am I doing wrong?
    Thanks!
    Mikkel

    Thank you VERY much for your reply.
    The message that appears when I send something is:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    MESSAGE delivery failed.
    The sender address [email protected] was rejected by the server.
    The server response was: 5.1.0 Authentication required.
    You can try to send using a different server. All messages will use this server until you quit or change your network settings.
    Send message using: smtp.gis net
    smtp.mac.com
    Edit Message Use Selected Served Try Again Later
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Later today I will try to follow the procedure you suggested and post a reply.
    F.Y.I., I previously changed the settings needed by my previous server to ones required by Comcast.

  • Sending mail with new SMTP server

    I recently switched from a tel.internet provider to COMCAST cable.
    I want to use my MAIL program, but each time I try to send mail, a box appears on my screen showing my old provider. I then have to click and the mail goes out.
    I have reset my COMCAST settings properly. COMCAST says it is a Apple computer setting problem. What steps do I have to take to get my MAIL to work properly?

    Thank you VERY much for your reply.
    The message that appears when I send something is:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    MESSAGE delivery failed.
    The sender address [email protected] was rejected by the server.
    The server response was: 5.1.0 Authentication required.
    You can try to send using a different server. All messages will use this server until you quit or change your network settings.
    Send message using: smtp.gis net
    smtp.mac.com
    Edit Message Use Selected Served Try Again Later
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Later today I will try to follow the procedure you suggested and post a reply.
    F.Y.I., I previously changed the settings needed by my previous server to ones required by Comcast.

  • Have difficulty sending mail from iPad 2

    I am having difficulty sending an e-mail from my iPad 2. I am using Telus as my server and I can't find a solution?

    Thanks for contributing your answer and welcome to Apple Discussions!
    Pointing out deficiencies in someone's posts is not necessarily insulting and you'll have to take it as an article of faith that when I do set out to be deliberately insulting there is no ambiguity involved. I also do not agree that pointing out those deficiencies is not helpful, as I believe they are: While OP will not have his question answered (nor, indeed, could he have done), both he and others reading the thread might come away with the idea that a bit more care and attention taken in the writing up of their questions will immediately result in more and better and quicker responses and solutions to them.
    I'm glad, as we all are, that your solution worked for you and, unlike the vast majority of newer users here, you did at least take the trouble to post it up and share it. Let me ask you, though: What do you plan on doing when OP (stands for Original Poster, btw) comes back with the common, "Yeah, I tried that, it didn't work, what else should I do?" response? Make a few more guesses? Ask a few more questions? Shrug and move along?
    The following is the alternate boilerplate that I quite frequently toss up in these sorts of situations which, funnily enough, will also occasionally generate the same sort of reproving responses:
    I don't understand what you're saying. Please try the following if you'd like to save yourself and others a lot of time:
    Describe what you are trying to do
    Describe how you are trying to do it, in as much detail as you can.
    Describe what you expect to see or have happen when you do it that way
    Describe what you see or what happens instead of what you expected; include any error messages that appear.
    Provide some idea of what you have already looked at or already tried doing to fix the problem, along with the results of those attempts.

  • Sending mail - ORA-29278: SMTP transient error: 421 Service not available

    Hi everybody,
    I am trying to send mail using
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    But getting the error as mentioned in the title.
    I searched the forum and find so many threads.
    But not sure what to do.
    Can anyone help me,please?
    Thanks,
    jeneesh

    Hi
    Send you the code we use.
    PROCEDURE send_email (from_name varchar2,to_name varchar2,subject varchar2,message varchar2,max_size number default 9999999999,file_name varchar2 default null) is
    v_smtp_server varchar2(100) := your_smtp_server;
    v_smtp_server_port number := 25;
    v_directory_name varchar2(100);
    v_file_name varchar2(100);
    v_line varchar2(1000);
    crlf varchar2(2):= chr(13) || chr(10);
    mesg varchar2(32767);
    conn UTL_SMTP.CONNECTION;
    v_slash_pos number;
    v_file_handle utl_file.file_type;
    invalid_path exception;
    begin
    conn:= utl_smtp.open_connection( v_smtp_server, v_smtp_server_port );
    utl_smtp.helo( conn, v_smtp_server );
    utl_smtp.mail( conn, from_name );
    utl_smtp.rcpt( conn, to_name );
    utl_smtp.open_data ( conn );
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: ' || from_name || crlf ||
    'Subject: ' || subject || crlf ||
    'To: ' || to_name || crlf ||
    'Mime-Version: 1.0' || crlf ||
    'Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"' ||
    crlf ||
    '' || crlf ||
    '--DMW.Boundary.605592468' || crlf ||
    'Content-Type: text/plain; name="message.txt"; charset=US-ASCII' ||
    crlf ||
    'Content-Disposition: inline; filename="message.txt"' || crlf ||
    'Content-Transfer-Encoding: 7bit' || crlf ||
    '' || crlf ||
    message || crlf ;
    utl_smtp.write_data ( conn, mesg );
    if file_name is not null then
              begin
                        v_slash_pos := instr(file_name, '/', -1 );
                        if v_slash_pos = 0 then
                                  v_slash_pos := instr(file_name, '\', -1 );
                        end if;
                        v_directory_name := substr(file_name, 1, v_slash_pos - 1 );
                        v_file_name := substr(file_name, v_slash_pos + 1 );
                        v_file_handle := utl_file.fopen(v_directory_name, v_file_name, 'r');
                        mesg := crlf || '--DMW.Boundary.605592468' || crlf ||
                        'Content-Type: application/octet-stream; name="' || v_file_name ||
                        '"' || crlf ||
                        'Content-Disposition: attachment; filename="' || v_file_name ||
                        '"' || crlf ||
                        'Content-Transfer-Encoding: 7bit' || crlf || crlf ;
                        utl_smtp.write_data ( conn, mesg );
                        loop
                                  utl_file.get_line(v_file_handle, v_line);
                                  mesg := v_line || crlf;
                                  utl_smtp.write_data ( conn, mesg );
                        end loop;
                        exception
                             when utl_file.invalid_path then
                             dbms_output.put_line('Error in opening attachment ' || file_name);
                             when others then
                             null;
              end;
    end if;
    mesg := crlf || '--DMW.Boundary.605592468--' || crlf;
    utl_smtp.close_data( conn );
    utl_smtp.quit( conn );
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlerrm);
    dbms_output.put_line(sqlcode);
    end;
    Hope it helps u

  • Can't send mail after security update

    Hello, I installed a security update friday night, and can no longer send email using either Mail 2.1 or Thunderbird. Both were working prior to the security update.
    I am not getting any error messages except for the ones over the phone that go..."did you get my email? What email?" In fact, both Mail and Thunderbird give every indication that the email was sent.
    I can mail myself a test from a web program, so my smtp server is working.
    I can receive mail fine.
    I am blaming the security update for this, but I have no idea where to look or what to do. Can I uninstall the update?

    You're welcome.
    The thing is, AFAIK Mail wouldn't put the message in the Sent mailbox unless it has received confirmation from the outgoing server that the message has indeed been sent, so it seems to me that the problem is not that messages are not being sent, but rather that they don't arrive at the destination for some reason.
    I bcc myself on every email for filing reasons and have
    not recieved one of my own emails since Friday night.
    Do you receive other mail normally? Have you checked for those messages on the web?
    I can log into my employers web tool and send email that way,
    so something is going on with my machine, whatever it is.
    Well, not necessarily. Maybe there is something wrong with the outgoing server you're using in Mail. Is this your only mail account? Do you have access to any other outgoing server that you could try?

  • Gmail: 'Send Mail As' IMAP, SMTP problems

    Hello,
    Here's the background:
    I have a work email address that's automatically forwarded to my gmail account. I have it setup through Gmail to use my works outgoing SMTP server so whenever I send an email through my Gmail account it appears to be coming from my work account. It works fine.
    It does not work on the Iphone. I have tried setting up Gmail through exchange, through the normal Gmail setup and inputting manually through the IMAP setup. In all 3 occasions my Gmail email address appears on outbound email and not my work email.
    My last effort was to input a new IMAP account into the Iphone using my works email address, Gmails incoming IMAP server and my works outgoing SMTP server. All with SSL and different usernames/passwords.
    Theoretically it should've worked. And it did, sort of.
    I was able to download the Inbox from Gmail with no problems. And, I was able to send email with the above configuration but the emails just vanished. The never reached their intended destination.
    My works email is setup using Godaddy's server smtpout.secureserver.net. All usernames, passwords, ports etc... are correctly entered.
    Any suggestions?

    thnx for replying but the problem is that it does not show the emailadress that i chose to send from. When i click on the full name in "Sent Mail" it shows my primary email.
    I want to see the emailadress i chose so i can check if I emailed with the correct address.
    Lets say my primary email is: [email protected] and my secondary [email protected]
    When i use [email protected] to send from it wont show this address in "Sent", it shows "From: My name" when i click on my name it shows [email protected] and not [email protected]
    It did send it from [email protected] tho because when i log-in in webmail with [email protected] i see the email in "Sent Mail". And the inbox i sent the email to does see the emailadress i chose and the full name i use in Mail.app.
    Idk if its possible to change this?
    else i just have to stay using webmail if i want to use an other email to mail from.

Maybe you are looking for

  • 2 ipods on 2 different computers

    MY IPOD TOUCH WHEN I TRY AND HOOK TO DESKTOP PC ASK ME DO I WANT TO OPEN WITH MICROSOFT WORD, OFFICE OR SCANNING/CAMERA. iT IS SUPPOSE 2 GO 2 ITUNES. iT IS SET ON MANAGE MANUALLY. PLEASE HELP.

  • How can i export 3D plots to a jpeg or bmp or png etc?

    i want to export 3D plots to a picture format how do i do this?

  • My iPod won't turn on!  What's wrong with it?

    This morning I woke to find my iPod fully charged. The green battery with the blug in icon in the middle was visable. I removed the charging cord from the bottom dock of my iPod and it turned off as usual as soon as I did. But this time - it didn't t

  • Report Obsolete recvery window doesn't work?

    Hi, As I write this the date is the 21st Jan, I have archived redo logs dating back to the 14th Jan. When i execute the following: REPORT OBSOLETE RECOVERY WINDOW OF 3 DAYS; I get: no obsolete backups found Shouldn't this list all of the redo logs ol

  • Home folder full

    When I try and open my mail I get a dialog box that says home folder full, delete files. How do I do that? Where do I go? I have deleted files in my documents, etc. still get the message. I am not out of space on the hard drive.