Relaying problem when sending email

Hi All,
I have read all of the forums regarding this type of problem but I am still unable to send email to outside addresses such as hotmail or yahoo. I can send to internal email adresses without a problem. I have tried autheticating myself with the server first but that didn't make a difference and I cannot make changes to the exchange servers settings for relaying like someone suggested. I know the server is setup correctly because I can send email to external accounts with my desktop outlook client. Can someone please take a look at my code and tell me if their is a problem with it. Thanks in advance!!
public void execute(javax.mail.Store store, Hashtable variables) throws Exception
        // Get system properties
        Properties props = System.getProperties();
        // Setup mail server
        props.put("mail.smtp.auth", "true");
        props.put("mail.transport.protocol", "smtp");
        props.put("mail.smtp.host",store.getURLName().getHost());
        // authenticate myself with the server
        Authenticator authenticator = new ServerAuthentication(myUsername, myPassword);
       // Get session
        Session session = Session.getDefaultInstance(props,authenticator);
        session.setDebug(true);
        // Define message
        MimeMessage message = new MimeMessage(session);
        message.setReplyTo(new Address[] {new InternetAddress("[email protected]")});
        message.setRecipient(Message.RecipientType.TO,
                             new InternetAddress(((String)variables.get("msgTO")).trim()));
        message.setSubject((String)variables.get("msgSubject"));
        message.setText((String)variables.get("msgBody"));
        // Send message
        Transport transport = session.getTransport();
        transport.send(message);
        transport.close();

Hello,
I'm in the situation than yours.
Here is the code I use to send emails. I had problem with authenticator.
Transport transport = session.getTransport("smtp");
transport.connect(server, login, password);
transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
transport.close();
Hope this help

Similar Messages

  • Garbled text when sending emails

    Is anyone else having a problem when sending emails and some of the words looking like this, H=w are y=u?
    I've wiped and re enter my email account and text is still garbled. Also the Add to Home Screen does not work after security wiped.
    Please help!

    This is a known issue.
    http://forums.crackberry.com/blackberry-z10-f254/emails-sent-received-garbled-780422/#post8192729
    Z10
    Rogers, Halifax NS

  • HAVE A PROBLEM WHEN SENDING AN EMAIL IT STATES IT DOES NOT ALLOW RELAYING

    HAVE A PROBLEM WHEN SENDING AN EMAIL IT STATES IT DOES NOT ALLOW RELAYING

    You have either entered the wrong SMTP server info or they have blocked the sending of e-mails from outside their network. That message indicates that you are not permitted to send through that server from the network you are using to connect.
    Contact them again. There is no magic that will allow you to bypass this.

  • After updating to the new ios5 with my 4S , no wifi connection (at home), problem when sending or receiving email

    After updating to the new ios5 with my 4S, no wifi connection and problem when sending or receiving email. I had no issue before the update... I am very disappointed

    Did you already try to reset your network settings in Settings/General/Reset?

  • Versamail error when sending email

    i have a palm t/x.  versamail works great receiving mail but when i try to send a new email or reply i get an "error 554 relay access denied".  my account is set up as an imap.  anyone have suggestions to a solution?  thanks all
    Post relates to: Palm TX

    pdadude, are you using Sprint's SMTP server? They do block a lot of outgoing servers so it's easier sometimes to just use theirs. One way to test is to sign up for a free gmail account and turn on POP or IMAP then configure that in VersaMail. See if you can send then.
     Outgoing mail server issuesDoes your Internet service provider (ISP) prevent you from sending emails because they do not recognize your Internet location (via your smartphone)?
    Your smartphone may be connected to an IP address that your ISP's email server does not recognize. The server may refuse to send your emails unless you authenticate yourself; it thinks you may be a SPAMmer.
    Simple solution: use another SMTP server furnished by your mobile service provider expressly for this purpose. With the exception of AT&T, all mobile service providers offer an SMTP server to get around problems with sending email. Plug in the new SMTP server name, a username and password and off you go.
    Contact your mobile service provider, and find out if you can use their SMTP server to send SMTP emails (we provide the details for all the common mobile service providers below to save you the call).
    Note: Keep your email service provider's server as the Incoming (POP) server; there is no need o change this.
    Does your mobile service provider prevent you from sending emails from a different server?
    Many mobile service providers do not allow users to send email from a connection other than their own (the mobile service provider's, that is). Contact your mobile service provider, and find out if you can use their connection to send SMTP emails. If you can, enter this information as the incoming server; keep your email service provider's server as the outgoing server. See the chart below.
    Does your mail server require SMTP authentication?
    Your email service provider may require a username and password to be entered when you send email. This helps ensure security and reduce spam. See the chart below.
    Here's how to add your outgoing username and password:
    In VersaMail, open the Menus.
    From the Accounts menu, select Account Setup.
    Highlight the email account you want to check,then select Edit.
    Depending on your version of VersaMail, you may have to select the Next button several times to get to the Advanced settings.
    When you see an option for ESMTP (may appear as "Use authentication (ESMTP)" or "My server requires authentication (ESMTP)"), check the box next to this option.
    Enter the outgoing username and password for ESMTP. See the chart below for this information.
    SMTP servers, usernames and passwords
    (find your carrier below) AT&TThe information below is based on former Cingular Wireless* settings, which may have changed. For the latest information, contact AT&T.
    With legacy AT&T Wireless accounts, you may have had two email accounts. One contained your former AT&T Wireless mMode username ([email protected]), and the other contained your phone number ([email protected]). If you don't already have an mMode username, contact AT&T for more information.
    Former AT&T Wireless accounts could not send emails from third-party email accounts; you needed your mMode email address to send mail. Under former AT&T Wireless settings, you would still be able to receive emails from an unrelated POP3 account, but any outgoing mails must be sent from your mMode email address. Contact AT&T for updates.
    Outgoing (SMTP) Server: cwmx.com
    User name: (none)
    Password: (none)
    *AT&T provides service for former Cingular Wireless accounts.Rogers Wireless For Rogers Wireless, you do not need to enter a user name or password, but you do need to enter the SMTP server info.
    SMTP Server: smtp.rogerswirelessdata.com
    User name: None
    Password: None
    Sprint PCS Before setting up your email account, you'll need to set your PCS Vision Email password. If you haven't already done this, go to MyPCS on the Sprint PCS website and login. Select "My Personal Information." Under "Passwords," to the right of PCS Vision User Name, select "Modify." You'll see your Sprint PCS email address; remember this address. Go back to My Personal Information. Under PCS Vision User Name, to the right of PCS Vision Password, select "Modify." Create a new password. Note: When you do this, your PCS Vision password will be reset on your smartphone. Make sure you're in an area of coverage.
    SMTP Server: smtp.sprintpcs.com
    User name: Your PCS Vision Email username (the part before the "@" in your email address)
    Password: Your PCS Vision Email password
    T-Mobile You may not need to enter an SMTP username and password. However, if you're having problems sending, you may need to contact T-Mobile and register your POP server and password. You'll be issued an SMTP username and password for sending emails on T-Mobile's SMTP server. While you're at the T-Mobile website, turn off the Alerts option, or you'll receive SMS messages containing the text of received emails.
    SMTP Server: myemail.t-mobile.com
    User name: None, or T-Mobile SMTP username (above)
    Password: None, or T-Mobile SMTP password (above)
    Verizon Wireless
    SMTP Server: smtp.vzwmail.net
    User name: [10-digit phone number]@vzwmail.net ([email protected])
    Password:Your www.vtext.com password
    Security note: If you are uncomfortable using the SMTP server of your mobile service provider, you can also setup VersaMail's SMTP authentication settings so that VersaMail will pass an SMTP username and password to your existing server to meets its security requirements. See the VersaMail portions of your user guide for more details on the options available. Please consult your ISP for the settings required for their particular SMTP server. Some ISPs and DSL providers use restricted IP-ranges for authentication so that it is never possible to authenticate to your current SMTP server when connected via your wireless account. In that case, you have no option but to use the mobile service provider's Outgoing (SMTP) server.
    Post relates to: None
    Post relates to: None

  • IPhone connections hangs when sending email after upgrade.

    After upgrading to 2.0 firmware on my first generation IPhone, the phone now regulary hangs when sending email via smtp. Even if I try to close the connection by putting it into AirPlane mode and back again it still hangs and from that point onwards doesn't check or send any new emails. If I then shut the phone down and restart it looses the email as it's not either in the sent or outbox folders. This has happened quite a few times since upgrading. Does anybody have any advice?

    Found this useful tidbit by mdwelsh231 on another thread:
    "I'm having this problem too. Rather than rebooting the phone, an even easier solution is to hold down the Home button for several seconds (I believe it's 8 sec) which will kill the Mail application and return you to the home screen. Restarting Mail (by tapping the Mail icon) will cause it to reconnect. I find that this resolves the connection hanging issue. However, it is still kind of a pain. I suspect a bug in the 2.0 iPhone firmware. "
    Worked for me
    Cheers,
    C

  • Msg say SMTP Server timed out when sending email w/attachment; otherwise sends fine.

    I have problems when sending an email with attachments (generally pdf). I get the error msg stating my smtp server connection has timed out. I can 'sometimes' reboot after saving the email, once restarted I can open the draft and it will go... sometimes not. I test the smtp server by immediately sending a 'test' email without any attachments and it will go right through. Open the saved draft and attempt to resend and it will fail. SMTP settings are correct and have not changed in several years and have not experienced any problems until this latest update to Thunderbird. I can use the same account at Go daddy's web mail application, send the same email with the identical attachment and it works correctly... so I don't think it is the 'attachment' or it's size. I can send 'test' emails to myself or my wife's account and everything works correctly during the session until I attempt to send an email with the attachment and it fails. Immediately send another 'test' email without attachment to the same account and it will go through. I am at a loss as to what to do next to correct this. I am contemplating an uninstall and re-install. No new software has been added to this computer and this problem just recently popped up. I'm stumped...

    This sounds like more McAfee funny stuff. But it could be any anti virus really. Disable attachment scanning on outgoing mail and you should be good to go.

  • Since upgrading my ipad and iphone software i am receiving an error message when sending emails, saying that the email address was rejected by the server.

    Hi,
    Since upgrading my ipad and iphone software i am receiving an error message when sending emails, saying that the email address was rejected by the server.
    Please advise if this is a known problem, and what is the fix.
    Many thanks
    Mark

    Try a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. The screen will go blank and then power ON again in the normal way.] It is app and data safe!

  • When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a symbol on every line. How to stop this from happening?

    When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a > symbol on every line. How to stop this from happening?

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • Attachment failure when sending email

    three days ago I detected the problem with Convergence,attachment failure(any type of files) when sending email,the attachment suddenly disappears (confirmed by checking the convergence webmail Sent folder and the recipient only receiving the body text message without the attachment(s)) .However , sending with attachment through mail client software such as Thunderbird is OK . before this problem happened , the system can send email with attachment without any problem . Please help on how can I fix this ?
    the java messaging server details :
    Sun Dir LDAP
    #./iwcadmin -V
    Sun Convergence 1.0-10.01 (built September 6 2009 - 18:29:30)
    Sun Java(tm) System Messaging Server 7.0-3.01 32bit
    on Solaris- Bourne shell
    #uname -srv
    SunOS 5.10 Generic_137137-09

    mattzyzy wrote:
    -all users experiencing the same problem now with Convergence
    I don't see this behaviour with my test Convergence patch 10 install (Comm-Suite-7). I should point out that you need to be running MS7u3 a.k.a. MS7.3-11.01 as per the documentation:
    http://wikis.sun.com/display/CommSuite7/Communications+Suite+7+Component+Products+Release+Notes#CommunicationsSuite7ComponentProductsReleaseNotes-RequirementsforCommunicationsSuite7
    "Communications Suite Component Requirements for Convergence 1 Update 3"
    "Messaging Server - Webmail Server => 7 Update 3"
    -Firefox 3.0 ,3.5 , IE 7,8
    small attachment size 100KB to 400KB - PDF ,MSWORD (DOCX AND DOC), -all the types that work prior to this problem happened .Do the users see the size of the attachment displayed next to the attachment name after uploading it?
    Regards,
    Shane.

  • Load x# of messages when sending email from my pop account

    Hi
    I'm getting a "load x# of messages" when sending email from any address on my pop account. No problem receiving messages from other accounts. Is there a setting that can remedy this?
    Thanks

    My z10 is going back today, for multiple reasons
    Contacts won't sync across
    Won't work properly with my car when all previous BBs did
    Lots of useful features have disappeared
    But most importantly NONE of my email accounts will send mail from it when they all did previously with the Storm2.
    A big thumbs down from me for the z10 even if it is a fancy looking phone and the browser is much better. I stuck with BB because I wanted a tool not a toy

  • Red Cross when sending emails

    Hi All,
    1st would like to say sorry if I have posted in the wrong error and I don't know much about blackberries.
    We have a client that is having a few problem with sending emails.
    When they send emails from inside the network (Via wireless) the email send OK.
    If they try sending an email from outside the network 5 mins later they get a red cross next to the email they just sent. They could be sending via 3g or on their home wireless.
    They don't have a Blackberry server, they send through their providers website, (I.E they log onto their blackberry account and the exchange account is set up in there). (Think its called Blackberry internet service??)  When logging in to the account everything is set up OK as they have the green tick to say so.
    They have exchange 2003 version 6.5 (Build 7638.2 with service pack 2.
    We have another 3 companies that are set up this way with no problems.
    Any help would be very grateful.
    Thanks
    Regards
    Karl Thompson

    Hey karl_thompson,
    Welcome to the BlackBerry Support Community Forums.
    If you open up the sent message with the red cross it should say why it failed.  Can you provide the error message?
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • When sending email to pc users, recipient does not receive text in email?

    Hi
    when sending email using MAIL to pc users from 27" IMAC, recipient receives the email and attachments, but does not receive my note/text in email?
    any ideas?

    If they are using Outlook, that is likely the problem.
    There are two settings in the Edit>Attachments, Always send windows-friendly and attachments at end of message.
    Also, set the message as Plain Text (Format menu).
    Outlook has always been crappy with anything but Exchange email. They haven't fixed it in about ten years, so I wouldn't expect any changes in the future.

  • I'm having problems receiving/sending emails thru Outlook.

    I switched internet connection from AT&T to Comcast and I'm still utilized several AT&T email address's for free. I'm having problems receiving/sending emails thru Outlook.  Could the problem be due to using their free emails with no support.
    Do I have to go thru yahoo to read/send emails?

    Change the ISP would not effect the email connection generally. (Only when ISP disable your mailbox which they could control directly.)
    I suppose that your Outlook still store/cache the AT&T messages, try to export them as PST data file for backup.
    Setup the new Yahoo in your current Outlook first and then import that backup.pst to continue to use.
    http://support.microsoft.com/kb/287070/en-us
    Thanks
    Tony Chen
    TechNet Community Support

  • TS3899 When sending email from the Mail App or through other Apps, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design.

    When sending email from the Mail App or through other Apps on my iPad, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design, especially since I had already checked the From: address.
    iPad 4 running iOS 8.1.3

    3rd party email addresses have to be deleted on every synmced mac product, although I have 1and1.co.uk and my imac updatetes the mails in that account from mac mail.
    Yahoo etc is a 2 step deleting process but good to get your emails pushed when on the go.
    LJ
    http://www.facebook.com/The.Cowboy.Party

Maybe you are looking for

  • How do I find my hidden/missing photos?

    On my iPhone4 my Camera Roll is showing 925 photos, which I have recently backed up to my computer. However iTunes shows I have 2103 photos using 4.47 gb. On my phone under settings>general>usage>photos & camera it shows that I have used 4.6 gb. And

  • How do I mask a path with a blending mode so that if only effects the groups below?

    I am working on a logo but have run into what seems like a simple problem but nothing about masks that I have found seems to work. I have two groups and in one of them I have a path with an overlay blending mode. Above both groups I have the same pat

  • IPhone component AV out cable problems..

    Hello! I recently bought an Apple component AV out cable and was very excited when it came this morning. Upon opening it I realized that the TV out had 3 different connectors (green, red & blue) and my TV only has 1 which is yellow! Is there any way

  • Need help with the ipod nano

    I installed my ipod nano today and my computer recognizes the ipod but itunes wont' work. when i click on it to start it it brings up the license agreement and then it disappears and itunes never starts. can anyone help?

  • Using an alternative router for bt inifinity 2

    Is it possible for me to go back to using my last ISPs talktalk super router (built in fibre modem) as currently using a hub 5 and my kids on their consoles having problems staying connected and when they are connected half the time the nat type is m