Cannot see the logo in notification mail using BADI_BUILD_MESSAGE.

Hi all,
        I am doing the customization for email notification using the badi 'BADI_BUILD_MESSAGE' for a specific client. I want to include client's logo in the alert notification email. I have used the following document http://scn.sap.com/docs/DOC-42618  and the code given to the same to attach the logo in the mail body. The logo is placed in the MIME repository under 'SAP/PUBLIC' folder.
Following is the code that i have included into custimised method for BADI_BUILD_MESSAGE.:
"Create image in xstring form
*For Mime Repository
DATA : gv_mr_api TYPE REF TO if_mr_api,        "mime repository object
       gv_content TYPE xstring,                            "image in XSTRING
       is_folder TYPE boole_d,
       l_loio TYPE skwf_io.
*Image to Xstring Table form
DATA : l_obj_len      TYPE so_obj_len,
           lv_graphic_length TYPE tdlength,
           gr_xstr TYPE xstring,
           l_offset TYPE i,
           l_length TYPE i,
           l_diff TYPE i,
           ls_solix TYPE solix,
           lt_solix TYPE solix_tab.
*Attach image to HTML body
DATA: l_filename     TYPE string,
          l_content_id TYPE string.
*Create image in xstring form
IF gv_mr_api IS INITIAL.
  gv_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
ENDIF.
CALL METHOD gv_mr_api->get
  EXPORTING
    i_url = '/SAP/PUBLIC/abcd.jpg'  "Image path
  IMPORTING
    e_is_folder = is_folder
    e_content = gv_content
    e_loio = l_loio
  EXCEPTIONS
parameter_missing  = 1
    error_occured = 2
    not_found = 3
permission_failure = 4
    OTHERS = 5.
*Convert Image to Xstring table form
l_obj_len = XSTRLEN( gv_content ).
lv_graphic_length = XSTRLEN( gv_content ).
"get whole image
CLEAR gr_xstr.
gr_xstr = gv_content(l_obj_len).
l_offset = 0.
l_length = 255.
CLEAR lt_solix[].
WHILE l_offset < lv_graphic_length.
  l_diff = lv_graphic_length - l_offset.
  IF l_diff > l_length.
    ls_solix-line = gr_xstr+l_offset(l_length).
  ELSE.
    ls_solix-line = gr_xstr+l_offset(l_diff).
  ENDIF.
  APPEND ls_solix TO lt_solix.
  ADD l_length TO l_offset.
ENDWHILE.
*Attach image to HTML body
l_filename = 'abcd.jpg'.
l_content_id = 'abcd.jpg'.
CREATE OBJECT lo_mime_helper.
CALL METHOD lo_mime_helper->add_binary_part
  EXPORTING
    content = lt_solix                                 "Xstring in table form
    filename = l_filename                           "file name to be given to image
    extension = 'JPG'                                "type of file
    description = 'Graphic in JPG format'    "description
    content_type = 'image/jpg'                   "content type / Mime type. If mime type not present in system then need to add through tcode : SMW0
    length = l_obj_len                                "length of image
    content_id = l_content_id.                    "content id would be used in html part
*Create HTML mail body Content
REFRESH lt_soli[].
CLEAR ls_soli.
ls_soli = '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-template/2.1/"><head></head>'.
APPEND ls_soli TO lt_soli.
CLEAR ls_soli.
ls_soli = '<body>'.
APPEND ls_soli TO lt_soli.
"to apply font to HTML body content
"For displaying Image
CLEAR ls_soli.
ls_soli = '<br><img alt="No image" src="cid:abcd.jpg" /><br>'.
APPEND ls_soli TO lt_soli.
CLEAR ls_soli.
CONCATENATE '</body></html>'  INTO ls_soli SEPARATED BY space.
APPEND ls_soli TO lt_soli.
I have ommited to call the object  'lo_mime_helper' as mentioned in the original code given at http://scn.sap.com/docs/DOC-42618 as the BADI_BUILD_MESSAGE automaticaly create the sender and reciver for the mail.
I am getting the mail with 'X' No image in IBM Lotus Notes. I dont know what is wrong with the code. Why this code does not show the icon in the email. Any help will be appreciated.
Thanks and Regards,
Rutvik Upadhyay

You need to be identified by stmp server :
// Send message with authentication!
Transport tr = session.getTransport("smtp");
tr.connect(MailHost, user, pass);
message.saveChanges(); // don't forget this
tr.sendMessage(message, message.getAllRecipients());
tr.close();
Read JavaMail Faq please!

Similar Messages

  • I am using mac book pro and I cannot see the video of my chatmate using skype or fb.please help

    i am using mac book pro and I cannot see the video of my chatmate using skype or fb.please help

    Is your version of Skype known to work with your operating system version?

  • I cannot see the ad photos in Kijiji using Firefox but can see them using Explorer

    I tried uninstalling Firefox and then downloading it again. This just started happening about 3 weeks ago - fine before that.On Kijiji I can see pictures on the beginning page but when I go to the ads - say pet services - the photos do not load.

    I have Addblock Plus on Firefox (tools, add-ons, Addblock)
    I noticed that it was updated on july 2, 2011. I disabled it and now I can view the add's in Kijiji. Hope it helps

  • Why can't I use Snapfish anymore with iPhoto 08? I cannot see the library.

    I recently upgraded to iPhoto (iLife 08) now when I try to upload pics to snapfish it cannot see the folder. I know it is there cause I see it in Finder. It shows all other folders but the iPhoto folder is invisible. Does anyone know a setting or a way that I can utilize photo developing other than the proprietary ones for Apple?
    Please help. I feel like I've been swindled. (Seems Like something Microsoft would do)
    Jeff

    Jeff
    You haven't been swindled, no one is forcing you to do anything.
    With iPhoto 7 (iLife 08) the old iPhoto Library Folder is now a Unix Style Package File. The change was made to the format of the iPhoto library because many users were inadvertently corrupting their library by browsing through it with other software or making changes in it themselves.
    It has never been the correct procedure to root through the iPhoto Library Folder - in fact on every version the documentation has expressly stated that you should never do so.
    There are many, many ways to access your files in iPhoto:
    For 10.5 users: You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. If you're using Gmail you can use THIS
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    Or, if you want to access the files with iPhoto not running, then create a Media Browser using Automator (takes about 10 seconds) or use THIS
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    All of these are faster and safer than rooting around in the iPhoto Library Folder
    You might also check if Snapfish have updated their plug-in for iPhoto yet? If Snapfish haven't bothered to update their plug-in, you might want to check out many of the other services that have. Or are supported by an app like PictureSync. So, nothing proprietary there.
    Regards
    TD

  • I am facing problem in using viber...can not receive  any call from Viber whn keypad is locked and whn i unlock phone thn on opening viber i can see the missed call notification... kindly guide me there is any setting so0 tht i can receive viber calls

    I am facing problem in using viber...can not receive  any call from Viber whn keypad is locked and whn i unlock phone thn on opening viber i can see the missed call notification... kindly guide me there is any setting so0 tht i can receive viber calls whn my phone is locked even as i can receive calls on HTC

    Hi,
    This is an official representative of Viber Media.
    Unfortunately we cannot change this feature due to Apple's restrictions. :/
    For more questions or technical support, please visit our official HelpDesk.
    Thanks,
    Viber

  • I upgraded my iPad and now I cannot see the mail boxes, I upgraded my iPad and now I cannot see the mail boxes, I upgraded my iPad and now I cannot see the mail boxes

    I upgraded my iPad to the newest version of iOs and now the body of the message is covering the full screen and cannot see the list of mailboxes, I have no idea of what to do to fix this.

    That view is the normal view in the portrait orientation. If you are in portrait, swipe left to right and the mailbox list shows up. If you are in landscape, then that isn't right.
    Restart or reset the iPad and see if that helps.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    You can also try quitting mail and restarting.
    Go to the home screen first by tapping the home button. Quit/close open apps by e w the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • HT204291 Help! I cannot see the Airplay symbol on any of my devices anymore!  I have tried following all guides and troubleshooting, but to no avail. Just cannot use the AppleTV with any of my devices.

    Help! I cannot see the Airplay symbol on any of my devices anymore!  I have tried following all guides and troubleshooting, but to no avail. Just cannot use the AppleTV with any of my devices.

    Thanks for the link. It didn't work at first on any of the devices but then I decided to enter a manual DNS instead of an automatic configuration. Then followed the steps again from your link and it worked.
    It is not stable though as I need to reset the device for it to see the airplay. But when it is connected it stays connected for 30 minutes approx.
    Any other suggestions to keep it stable would be fantastic but at least in the meantime I have a workaround.
    Thanks

  • Does Mac Messenger work with iPhone 4   system 5.01...? (I am receiving a notification of receipt but cannot see the messages sent.)

    To those who might know
    I have an iPhone 4, with OS 5.1
    I am receiving notifications of messages sent by various other users but cannot see the messages.
    Question: does Mac Messenger only work with 4S models..?
    Thanks.

    a successful automount of the other mini cd gives me
    $dmesg | tail
    [ 5667.156904] ISO 9660 Extensions: Microsoft Joliet Level 3
    [ 5667.157448] ISOFS: changing to secondary root
    and
    $mount
    /dev/sr0 on /media/110103_1110 type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks)
    and there is a /dev/sg1 under /dev (instead of only sr0 before~~)
    (nothing changed in lshw (well, except the mount point is added~~~))

  • In using MS Word for mac, and using track changes, and I send a copy, the recipient cannot see the track changes, nor do they show up on the printed copies, even though I highlight show changes in print

    In using MS Word for Mac, and in using Track Changes, when I send an email with the changes, the recipient cannot see the highlighted changes, nor do the printed pages show the highlighted changes, even though I have checked "show highlighted changes"

    In using MS Word for Mac, and in using Track Changes, when I send an email with the changes, the recipient cannot see the highlighted changes, nor do the printed pages show the highlighted changes, even though I have checked "show highlighted changes"

  • I updated to the latest version and now I do not have the page controls at the right hand side and bottom and can only move the page up and down using the mouse scroll wheel. I also cannot see the whole page I am trying to view.

    When I open the web browser I cannot see the whole page and I cannot move the image sideways and must use the mouse scroll to move up and down.

    Try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder:
    User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • Re: When use FN+F8 cannot see the confirm icon on my desktop

    Hi everyone
    When I try to enable Wi-Fi or Bluetooth I cannot see the confirm icon on my desktop that show enable or disable of Wi-Fi or Bluetooth.
    Please can you help?

    Hi Alawi
    Maybe you should tell us which notebook model do you have and which operating system do you use.
    After reading your one sentence problem description only thing I can say is: reinstall Toshiba value added package and check functionality again.

  • CAnnot see the tree and how to sync users

    Setting up a demo network.
    1 Novell Netware SBS server
    1 Linux SBS server
    Installed eDirectory to the Linux box, imanager and everything works fine.
    Netware - master replica
    Linux - read/write
    If the Netware server goes down, we cannot see the tree.
    Tried with SLP and without.
    creating users in iManager from either server IP works fine and shows up in
    Console1
    Is there a way that when we add a user to the NDS, that it will create a
    user on the Linux server as well? I mean on the actual linux server, not
    eDirectory?
    I suppose similar to setting DirXML for Active Directory and NDS?

    Hi, thanks for your e-mail, pretty much the same deal for me, except one of
    my techs is a Red Hat guy, so we had some tech knowledge before testing
    this.
    Actually, we noted that through ldap, we can see the eDirectory users on the
    Linux server under the users section, and we can add them to linux groups
    and shares, which through the setup of Samba, can map drives to the linux
    server.
    you should check out the article I sent along earlier that explains how to
    set that up. Very interesting.
    >>> <stanch@**.co.uk> 3/4/2006 1:11:31 AM >>>
    Hello Robert,
    Just so you don't feel alone out there..
    A little of my background. I am a Linux newbie, ex MCNE from NW4 days and
    run and deploy NW65 im my job. I decided to learn Linux and as I don't use
    it at work. I thought the only real way to get familiar with it was to run
    it at home. I purchased NLSBS9 and have installed it as the home server
    and it runs the households email and Internet access. My users have
    resistance to Linux at the desktop so its XPpro for now.
    My experiences with NLSBS9..(remember I am a Linux newbie, hopefully if I
    tell you something that is incorrect someone will jump in and correct me.)
    It appears that NLSBS9 with it's accompanying Novell Linux desktop
    licences was conceived as a total package. Linux clients to Linux server.
    Windows client support is not so well implemented. For Windows user file
    and printer access you need to run and configure Samba. Samba requires
    linux users to be created and these are stored in an Ldap directory.
    eDirectory is present solely for GroupWise to run, it is not linked to the
    LDAP directory. The two directories are not linked or synced in any way.
    I thought NLSBS consisted of Suse Linux Open server plus Groupwise.
    Apparently not, as Suse has a facilty called LUM (Linux user management)
    which is a tool that you can manage users with and it is linked to
    eDirectory.
    A little birdie tells me an announcement about NLSBS9 and future
    developments could be made during Brainshare....
    There is a .PDF of nearly 8 mbs. that is a introductory course to
    installing and configuring NLSBS9 you can get it by running this url :-
    http://www.novell.com/partners/nlsbs...lsbs_final.pdf
    NLSBS9, for me, has been rock solid and all issues with it have been
    caused by my own inexperienced hands.....GroupWise has performed
    faultlessly.
    Hope this helps..
    Rgds.
    Stan Chelchowski

  • When I log in to my hotmail account on mu apple Ipad, I see inbox only and cannot see the word ''new'' to send emails. So I can read my emails but cannot send. Where is the feature to send emails.

    QUESTION : when I log into hotmail on my new ipad, I only see inbox where I retrieve my messages but cannot see the word  ''New'' which would
    allow me to send emails the way it would be on a desk pc. So I can retrieve my messages but cannot send ???
    Thank you in advance for help.

    The icon in the upper right of the screen (assuming you are using the Mail app) that looks like a square with a pen is the new message button. Tap that to create a new mail message.

  • I am not able to see toolbars, when I open a new window that window is not visible, if I open from bookmarks and there is music playing I hear it but canNOT SEE the websites.

    I am not able to see toolbars, when I open a new window that window is not visible, if I open from bookmarks and there is music playing I hear it but canNOT SEE the websites. I was able to get window open from the help "window" and open sites from there just not from new: window tab or bookmarks those stay invisible? I tried the help suggestions, safemode,etc.

    Hi CMorenoOT,
    This prompt is usually displayed when your Apple ID needs to be configured for the iTunes Store. You'll want to run through the additional steps to setup your country, and payment information.
    iTunes: How to set up an Apple ID within iTunes
    http://support.apple.com/kb/HT2731
    Tip: If you are trying to create an account using an existing Apple ID, like your iCloud email address, you will receive a prompt telling you that your email address is already an Apple ID. Simply tap Continue, and then tap Use Existing Account on the following screen.
    - Next, you'll be required to enter your billing information. To choose a different Credit Card type, tap one of the available options, and then tap Done. You will not be charged until you make a purchase.
    - Once you've filled out all of the fields for your billing information, tap Next.
    For more information:
    Using an existing Apple ID with the iTunes Store and Mac App Store
    http://support.apple.com/kb/HT2589
    Thanks,
    Matt M.

  • After Upgrade to IOS 6.1, find my iPhone's map cannot see the street or city, especially in China, can we change back to google map in this app?

    After Upgrade to IOS 6.1 also with "find my iPhone" app, the map when locate my iphone cannot see the street or city, especially in China, can we change back to google map in this app?
    If the map cannot show details, how can we find my iphone? And it seem Apple just have an good idea for customer only but it is not function, why need to use Apple map in "Find my Iphone" if we all know it is not a good map!
    So stupid Apple!!!!!

    https://itunes.apple.com/us/app/google-maps/id585027354?mt=8
    It won't help find your iPhone, however.

Maybe you are looking for