Unable to send emails through adobe offline project.

Hi Experts!!!
                    I am trying to send an email through Adobe Offline Form. I am quoting the code. Plz check what's the problem with the code.
// This file has been generated partially by the Web Dynpro Code Generator.
// MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
// ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
package com.lifecyclelettersapplication;
// IMPORTANT NOTE:
// ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
// BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
// AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateFormView).
// OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
// A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
// OF IMPORT STATEMENTS.
//@@begin imports
import java.util.Properties;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import com.lifecyclelettersapplication.wdp.IPrivateFormView;
//@@end
//@@begin documentation
//@@end
public class FormView
Logging location.
  private static final com.sap.tc.logging.Location logger =
    com.sap.tc.logging.Location.getLocation(FormView.class);
  static
    //@@begin id
    String id = "$Id$";
    //@@end
    com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
Private access to the generated Web Dynpro counterpart
for this controller class.  </p>
Use <code>wdThis</code> to gain typed access to the context,
to trigger navigation via outbound plugs, to get and enable/disable
actions, fire declared events, and access used controllers and/or
component usages.
@see com.lifecyclelettersapplication.wdp.IPrivateFormView for more details
  private final IPrivateFormView wdThis;
Root node of this controller's context. </p>
Provides typed access not only to the elements of the root node
but also to all nodes in the context (methods node<i>XYZ</i>())
and their currently selected element (methods current<i>XYZ</i>Element()).
It also facilitates the creation of new elements for all nodes
(methods create<i>XYZ</i>Element()). </p>
@see com.lifecyclelettersapplication.wdp.IPrivateFormView.IContextNode for more details.
  private final IPrivateFormView.IContextNode wdContext;
A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
Represents the generic API of the generic Web Dynpro counterpart
for this controller. </p>
  private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
Represents the generic API of the Web Dynpro component this controller
belongs to. Can be used to access the message manager, the window manager,
to add/remove event handlers and so on. </p>
  private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
  public FormView(IPrivateFormView wdThis)
    this.wdThis = wdThis;
    this.wdContext = wdThis.wdGetContext();
    this.wdControllerAPI = wdThis.wdGetAPI();
    this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
  //@@begin javadoc:wdDoInit()
  /** Hook method called to initialize controller. */
  //@@end
  public void wdDoInit()
    //@@begin wdDoInit()
     /* The following lines initialize the context elements;
Enter your e-mail id in the set From-method
     //wdContext.currentContextElement().setTeststatus(" do in it");
        try{
        wdContext.currentEmailElement().setFrom("[email protected]");
        wdContext.currentEmailElement().setTo("[email protected]");                                            
        wdContext.currentEmailElement().setCc("[email protected]");
        wdContext.currentEmailElement().setBcc("[email protected]");
//        wdContext.currentEmailElement().setCc(" ");
//        wdContext.currentEmailElement().setBcc(" ");
        wdContext.currentEmailElement().setSubject("Test Mail By Umang");
        wdContext.currentEmailElement().setBody("You will find the address proof letter in the attachment of this e mail. Please sign this form and send it.");
       catch(Exception e)
         wdContext.currentContextElement().setTeststatus("do in it"+e.getMessage());              
    //@@end
  //@@begin javadoc:wdDoExit()
  /** Hook method called to clean up controller. */
  //@@end
  public void wdDoExit()
    //@@begin wdDoExit()
    //@@end
  //@@begin javadoc:wdDoModifyView
Hook method called to modify a view just before rendering.
This method conceptually belongs to the view itself, not to the
controller (cf. MVC pattern).
It is made static to discourage a way of programming that
routinely stores references to UI elements in instance fields
for access by the view controller's event handlers, and so on.
The Web Dynpro programming model recommends that UI elements can
only be accessed by code executed within the call to this hook method.
@param wdThis Generated private interface of the view's controller, as
       provided by Web Dynpro. Provides access to the view controller's
       outgoing controller usages, etc.
@param wdContext Generated interface of the view's context, as provided
       by Web Dynpro. Provides access to the view's data.
@param view The view's generic API, as provided by Web Dynpro.
       Provides access to UI elements.
@param firstTime Indicates whether the hook is called for the first time
       during the lifetime of the view.
  //@@end
  public static void wdDoModifyView(IPrivateFormView wdThis, IPrivateFormView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    //@@begin wdDoModifyView
    //@@end
  //@@begin javadoc:onPlugFromFirstview(ServerEvent)
  /** Declared validating event handler. */
  //@@end
  public void onPlugFromFirstview(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onPlugFromFirstview(ServerEvent)
     wdContext.currentContextElement().setTeststatus("from first view");
     //wdDoInit();
    //@@end
  //@@begin javadoc:onActionBack(ServerEvent)
  /** Declared validating event handler. */
  //@@end
  public void onActionBack(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionBack(ServerEvent)
    wdThis.wdFirePlugToFirstView();
    //@@end
  //@@begin javadoc:onActionSend(ServerEvent)
  /** Declared validating event handler. */
  //@@end
  public void onActionSend(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionSend(ServerEvent)
     Properties props = new Properties();
          String host = "rmail070.zmail.ril.com";
          props.put("rmail070.zmail.ril.com", host);
          Session session = Session.getInstance(props, null);
          MimeMessage message = new MimeMessage(session);
          Address toAddress = new InternetAddress();
          Address fromAddress = new InternetAddress();
          Address ccAddress = new InternetAddress();
          Address bccAddress = new InternetAddress();
     wdContext.currentContextElement().setTeststatus("1");
          try
               MimeMultipart multipart = new MimeMultipart();
               wdContext.currentContextElement().setTeststatus("2");
               BodyPart messageBodyPart = new MimeBodyPart();
               if (! wdContext.currentEmailElement().getFrom().equals(""))
                    fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());               
                    message.setFrom(fromAddress);
               wdContext.currentContextElement().setTeststatus("3");
               if (! wdContext.currentEmailElement().getTo().equals(""))
                    toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
                    message.setRecipient(Message.RecipientType.TO, toAddress);
               wdContext.currentContextElement().setTeststatus("4");
               if (! wdContext.currentEmailElement().getCc().equals(""))
                    ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
                    message.setRecipient(Message.RecipientType.CC, ccAddress);
               wdContext.currentContextElement().setTeststatus("5");
               if (! wdContext.currentEmailElement().getBcc().equals(""))
                    bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
                    message.setRecipient(Message.RecipientType.BCC, bccAddress);
               wdContext.currentContextElement().setTeststatus("6");
               if (! wdContext.currentEmailElement().getSubject().equals(""))
                    message.setSubject(wdContext.currentEmailElement().getSubject());
               wdContext.currentContextElement().setTeststatus("7");
               if (! wdContext.currentEmailElement().getBody().equals(""))
                    messageBodyPart.setText(wdContext.currentEmailElement().getBody());
               wdContext.currentContextElement().setTeststatus("8");
               multipart.addBodyPart(messageBodyPart);
               wdContext.currentContextElement().setTeststatus("10");
////               A new part will be added this will be the attachment
               messageBodyPart = new MimeBodyPart();
//               String filename = "temp
webdynpro
web
local
LifeCycleLetters
Components
com.lifecyclelettersapplication.LifeCycleLettersApplication
LifeCycle.pdf";
//               DataSource source = new FileDataSource(filename);
//               messageBodyPart.setDataHandler(new DataHandler(source));
//               messageBodyPart.setFileName(source.getName());                    
//               messageBodyPart.setHeader("Content-Type","application/pdf");
//               multipart.addBodyPart(messageBodyPart);
               message.setContent(multipart);
               Transport.send(message);
               wdContext.currentContextElement().setTeststatus("11");
          catch (AddressException e)
               wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
               e.printStackTrace();
          catch (SendFailedException e)
               wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
               e.printStackTrace();
          catch (MessagingException e)
               wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
               e.printStackTrace();
     catch(Exception e)
                         wdContext.currentContextElement().setTeststatus("action send"+e.getMessage());              
    //@@end
The following code section can be used for any Java code that is
not to be visible to other controllers/views or that contains constructs
currently not supported directly by Web Dynpro (such as inner classes or
member variables etc.). </p>
Note: The content of this section is in no way managed/controlled
by the Web Dynpro Designtime or the Web Dynpro Runtime.
  //@@begin others
  //@@end

Hi,
I think u need to set up the SMTP  So that u can send the email.
Regards
Mustafa.

Similar Messages

  • Unable to send email through sky

    Hi, unable to send emails through sky as it says the password is incorrect on the settings page

    Hello David.ball,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Log in to your email provider's website to ensure that the account is active and the password is correct.
    Restart your iOS device.
    Delete the affected email account from your device.
    Tap Settings > Mail, Contacts, Calendars.
    Choose the affected email account, then tap Delete Account.
    Add your account again.
    Have a nice day,
    Mario

  • HT201320 Unable to send emails through tiscali.co.uk on new iphone 4s

    I have recently got and Iphone 4s after much deliberation, and after enjoying many faultless years of different Blackberrys. Since switching over i can no longer send from my tiscali account and i have read threads basically saying it is a thankless task but i cannot believe that is the case... there must be users on the orange network on an iphone 4s on tiscali email that can send and recieve there email.
    Please please help as it is getting very frustrating.
    Thank you Vicky

    Hi there,
    You may find the troubleshooting steps found in the article below helpful.
    iOS: Unable to send or receive email
    http://support.apple.com/kb/ts3899
    -Griff W.

  • How do I get image puzzles to load as I am unable to send emails through my aol account today.

    How do I get image puzzles to load in order to be able to send aol.com email messages. Today I am not able to send emails because aol is having me solve an image puzzle. The problem is, is that an image puzzle does not load up, thus I cannot send emails. How to fix this? Tools, then what?

    Try going into Settings > Mail, Contacts, Calendars > select the account > account name , tap on SMTP (under the 'Outgoing Mail Server' heading) and then tap on your Primary Server and try entering your email account and password and see if it then works

  • Cannot send email through yahoo on iPad 4, apple.smtp.mail.yahoo not available as of December 1, 2012

    I am unable to send emails through yahoo on my ipad 4 wifi, just starting over the weekend. My 3 other non-yahoo email accounts are working fine on my ipad. When I try to send an email from the yahoo account, I receive the message that the connection to the outgoing mail server "apple.smtp.mail.yahoo" failed. I can send email through yahoo just fine on the web and on my computer through Thunderbird.

    Yahoo's been having persistently random issues for months. You can try just waiting it out, or delete and readd your yahoo account. When my accounts were affected I just used webmail to access my yahoo accounts until it cleared up.
    Chances are it's all on their end and really all you can do is wait it out.

  • Unable to send photo through email using iphoto theme (designs)

    Unable to send photo through email using iPhoto theme (designs) using the SHARE button.
    Error message:
    Your email did not go through because the server did not reply.
    Check your Internet connection.
    If the connection is working properly, the email server may be down.
    Try sending your email again later.

    Your email did not go through because the server did not reply.
    Check your Internet connection.
    If the connection is working properly, the email server may be down.
    Try sending your email again later.
    Are you using Yosemite and not apple's Mail app? Then you may need to set up an app-specific password: See the post below:
    Re: I am using iPhoto version 9.6 and I can no longer get an email sent with a photo attached. I get an error message saying the email did not go through because the server did not reply. I can send the photo with Mail. Help!in response to Gary Kissler
    This solution is for those of you using 2-step verification for your Apple ID and are using iCloud as the mail server that you are trying to mail photos with.
    I too had this issue. The problem in my case occurred because I had setup 2-step authentication for my Apple ID. If you have done this then you will get the error message "the mail server did not recognize your email/password...". To solve the problem go to:
    https://appleid.apple.com
    Click "Manage Your Apple ID"
    Verify your identity with the device you selected (if this step does not show up then you have not likely set up 2-step authentication and this is not your solution)
    Click Password and Security in the left column
    Click Generate an app-specific password
    Enter iPhoto as the name of the app
    Copy the password and paste this into the password box in iPhoto where you would normally enter your apple ID (in the mail account section in iPhoto preferences).
    And...voila' (I hope)

  • Unable to send email with an attachement (photo) through activesync (zarafa) after upgrading to ios8

    Hello,
    I just upgrading to ios 8 (8.0.2) and I am now unable to send email with an attachement (photo) through activesync (zarafa).
    It works fine with smtp or through activesync but without attachement.
    Is there any solution?
    Thx.

    It worked fine with the last version of iOS 7 and still works fine with outlook connected from a PC to the same activesync server.

  • I have Windows 8 but cannot send photos through Adobe email services

    I have Windows 8 but cannot send photos in email through Adobe email service.

    1. Log in to your mail provider on the web and add the following email to your address/contacts book.
    [email protected]
    2. Open Organizer and on the menu click:
    Edit >> Preferences >> Sharing
    3. Choose Adobe Email Service from the client dropdown menu.
    4. Add your name and email address to the fields provided and click OK
    5. Test the system (first use only)  by selecting a photo in organizer and choosing Share >> Photo Mail then click Next (Mac users should use attachments)
    6. Choose a contact then click  Next
    7. Click Next Step, then click Next - the sender verification dialog will open.
    8. Check you have spelt your email address correctly and hit the Resend E-Mail button.
    9. Go to your inbox (also check spam) and when the Adobe mailer message is received copy (Ctrl+C) the long verification code.
    10. Return to the verification dialog and paste it (Ctrl+V) into the Sender verification field and click OK. Wait for validation confirmation then click OK to continue

  • TS3899 I can recieve emails but cannot send emails through my iPad for my Comcast email account. I believe I have all setting aligned properly. Anyone else have this problem?

    I can recieve emails but cannot send emails through my iPad for my Comcast email account. I believe I have all setting aligned properly. Anyone else have this problem?

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
     Cheers, Tom

  • Unable to send email

    Recently unable to send email from my mac.Receives just fine and no problem sending on my ipad.Recent mountain lion update continues to fail;could they be connected?

    Before you try deleting it, is it a POP or IMAP account?
    If it's IMAP all your emails should re-appear when the account is recreated. If it's POP you should ensure you have backup of all your emails before deleting to restore from.
    Are you using Apple Mail? If so, to delete an account and noting the above, go to Mail>Mail Preferences>Accounts tab. Select the account to delete and click on the 'minus' button. To recreate it click on the 'plus'. You'll need to input your email credentials again. Mail should then try to auto configure but if it fails you may need to add server addresses.
    Even if the account is IMAP, I'd still take the precaution of having backup. I've gone through this process a few times with me me.com (IMAP) account and never needed it, but it's a nervous moment when everything disappears. Good when everything re-populates, though.

  • TS3899 unable to send email

    How can I fix this problem? I followed the troubleshooting steps to send an email from my iPhone 5 and it still isn't going through.  As iTunes suggested, I restarted my iPhone 5 and deleted my hotmail account.  Re-entered it, all user name and password is correct, I receive emails but can't send them out. I have tried everything I could and still get the error message saying "unable to send email". Please help! It's is frustrating, I feel helpless!
    Amy

    http://www.apple.com/uk/support/iphone/mail/
    http://support.apple.com/kb/TS3899
    http://support.apple.com/kb/ht4810

  • Droid Incredible Unable to Send Email

    I just got the DI and I cannot get it to send e-mail (it receives e-mail fine) on 2 different POP3/SMTP accounts.  I have verified the settings for each account, comparing it to what the same account in Outlook (which works fine), so I know the settings are correct.  I have tried deleting the accounts from the DI several times and have tried removing the battery and rebooting the phone.  Nothing has worked this far.
    Any suggestions?
    Thanks for any help.
    Brent

    The providers are 2 different Exchange servers from 2 different businesses that I do work with. 
    What settings are typically different when using a mobile device?  I have matched the settings that I have in Outlook as far as the server name, port, username, password and requiring authentication.  I am coming over from a BB device where I just put in e-mail account and password and everything worked.
    Since I can receive OK, I am assuming that something is wrong on the SMTP side of things.  When going through the settings on the DI, all of them appear to validate successfully but then when I try to send something I get the "Unable to send email" notification. 
    Thanks for the help.

  • Outlook 2010 address book prompt out hen trusted program try to send email through Outlook 2010

    Dear all,
      My program will send email through Outlook 2010(in cache mode). Sometime it may prompt the address book out and pend here, and we need to manually click "OK" to let the program run again. Although we re-write the program in
    Java and send by JavaMail now, but we are interested why the address book will prompt out.
      There are no pattern that we can guess the reason. Different recipient, different subject/content/have attachment or not can casue the address book prompt. But same email with same content/everythings may not cause prompt before and/or after.
      We try to change to offline address book and need manual sync, problem still occur.
      Just for interest~
    Cyrus
    [Sorry that MSDN not allow me to upload the cap screen :( ]

    Firstly, there is no such thing as a "trusted program" to Outlook. It only trusts COM addins, all other applications will cause a security prompt unless you have an up-to-date anti-virus app installed (if you can control the client environment).
    See http://www.outlookcode.com/article.aspx?id=52 for the list of your options. Essentially it is either installing an antivirus product or using a library such as
    Redemption (accessible from Java) or a utility such as
    ExpressClickYes.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

  • New problem-Unable to send email when on AT&T 2G or 3G only

    I have had a problem for the past two and a half days. As of about 11 am PDT on 3/16/10, I was no longer able to send email through my primary ISP email account (Speakeasy.net) from my iPhone when on AT&T's 2G or 3G network, but can if I'm on a WiFi network. I have had my iPhone 3G for about 18 months and this email account has functioned perfectly that whole time. I contacted Speakeasy's fabulous tech support and learned that EVERY Speakeasy iPhone user has the same problem. Apparently it is a problem with AT&T's servers. There is an issue with the "reverse DNS" response and AT&T's servers aren't responding in time or at all so the request to send mail (or verify the identity of the sender or Speakeasy's mail server - I'm not that much of a techie to totally get this) so the request times out. Speakeasy says that AT&T is aware of it and there is nothing they, Speakeasy, can do. I've spoken to AT&T about it twice, and they say they are moving it up the tech ladder and someone is supposed to get back to me within 48 hours. That deadline will come up soon.
    The odd thing is that I can continue to send mail from my backup Gmail account while on the 2G or 3G network. Unfortunately it isn't very convenient at all, and that begs the question as to why this is happening in the first place.
    At least I know it isn't just me, but I do wonder what other ISPs are affected by it. Hotmail? Earthlink? Astound?
    I am running the current versions of all software involved. And since I know it isn't just me, and that there's nothing I can do about it, that is cold comfort.
    I have to wonder where Apple's servers come into the outgoing email process as I understand all mail goes through (in some order or other) Apple servers, AT&T servers, and the subscriber's ISP.
    Is anyone else having this trouble? Apple-what can you do? I'm not getting the service from AT&T that I am paying for and I'm not a happy camper at this point.
    Thanks.

    Mail does not go through Apple servers at all unless you are subscribing to MobileMe, so this is not an Apple issue and they cannot help you. Also, this is a user-to-user site, you aren't speaking to anyone from Apple here. You have done what you can by contacting Speakeasy and AT&T, as you stated your deadline is not up yet. If it passes contact AT&T. You can also contact AT&T customer service and ask for a credit to your account.

Maybe you are looking for