Adding Image as attachment to e-mail UTL_SMTP

Guys ,
I am trying to add an image as attachment to an e-mail.
I am reading the image from the table and then passing it as a BLOB in my procedure.
Following is the part of the code which adds the attachment
{code}
PROCEDURE add_mail_attachment
              in_att_mime_type  in  varchar2 character set any_cs default 'text/plain; charset=us-ascii',
              in_attachment     IN  BLOB ,
              in_att_file_name  in  varchar2 character set any_cs default null,
              in_mail_conn      IN  UTL_SMTP.CONNECTION
IS
l_mail_conn       utl_smtp.connection;
l_step            PLS_INTEGER  :=2147483647;
BEGIN
    l_mail_conn:=in_mail_conn;
    if in_att_file_name is not null then
      UTL_SMTP.write_data(l_mail_conn, '--' || co_msg_boundary || UTL_TCP.crlf);
      UTL_SMTP.write_data(l_mail_conn, 'Content-Type: ' || in_att_mime_type || '; name="' || in_att_file_name || '"' || UTL_TCP.crlf);
      UTL_SMTP.write_data(l_mail_conn, 'Content-Disposition: attachment; filename="' || in_att_file_name || '"' || UTL_TCP.crlf || UTL_TCP.crlf);
      for i in 0 .. trunc((dbms_lob.getlength(in_attachment) - 1 )/l_step) loop
             UTL_SMTP.write_data(l_mail_conn, DBMS_LOB.substr(in_attachment, l_step, i * l_step + 1));
      END LOOP;
      utl_smtp.write_data(l_mail_conn, utl_tcp.crlf || utl_tcp.crlf);
    end if;
   EXCEPTION
   WHEN OTHERS THEN
      sbs_error.error_handler(
             in_error_no   => SQLCODE,
             in_error_txt  => SQLERRM,
             in_show_stack => TRUE
end;
{code}
And this is the code which i am running to test the code
{code}
declare
  in_sender                                                         varchar2(200);
  in_recipients                                    varchar2(200);
  in_subject                                                         varchar2(200);
  in_message                                                      varchar2(200);
  in_att_mime_type                                        varchar2(200);
  in_attachment                                                blob;
  in_att_file_name                                           varchar2(200);
  in_cc                                                                        varchar2(200);
  in_bcc                                                     varchar2(200);
  out_mail_conn                                               utl_smtp.connection;
  in_mail_conn                                   utl_smtp.connection;
  v_blob                                        blob;
begin
      in_sender := '[email protected]';
      in_recipients := '[email protected]';
      in_subject := 'Image attachment';
      in_message := 'Test mails ,Please delete';
      in_cc:='[email protected]';
      in_bcc:='[email protected]';
      select image into v_blob
      from table
      where condition
      sbs_util.sbs_p_email_pkg_raunaq1.open_mail
      in_sender     => in_sender,
      in_recipients => in_recipients,
      in_subject    => in_subject,
      in_message    => in_message,
      in_cc         => in_cc,
      in_bcc        => in_bcc,
      out_mail_conn => out_mail_conn
      in_att_mime_type := 'application/x-pdf';
      in_attachment := v_blob;
      in_att_file_name := 'Att1.pdf';
      sbs_util.sbs_p_email_pkg_raunaq1.add_mail_attachment
      in_att_mime_type  => in_att_mime_type,
      in_attachment     => v_blob,
      in_att_file_name  => in_att_file_name,
      in_mail_conn      => out_mail_conn
      sbs_util.sbs_p_email_pkg_raunaq1.close_mail(out_mail_conn);
END;
{code}

And this is the code which i am using :
There are basically 3 procedures
1.Open_mail() - Which is used to open a connection and start a mail message, The code is below
PROCEDURE open_mail (
                    in_sender         IN  VARCHAR2 CHARACTER SET ANY_CS,
                    in_recipients     IN  VARCHAR2 CHARACTER SET ANY_CS,
                    in_subject        IN  VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
                    in_message        IN  VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
                    in_cc             IN  varchar2 character set any_cs default null,
                    in_bcc            IN  varchar2 character set any_cs default null,
                    out_mail_conn     OUT UTL_SMTP.CONNECTION
AS
  l_mail_conn       UTL_SMTP.CONNECTION;
  l_email_addresses   VARCHAR2(32767);
  l_send_email_add    VARCHAR2(32767);
BEGIN
  IF in_sender IS NULL OR in_recipients IS NULL THEN
  RAISE e_null_email_add;
  END IF;
  l_email_addresses:=in_sender||','||in_recipients;
  l_send_email_add:=rtrim(in_recipients||','||in_cc||','||in_bcc,',');
  IF (validate_email_address(l_email_addresses) AND validate_email_address(l_send_email_add))   --if none of the email addresses are invalid ,then go for mail
  THEN
  l_mail_conn := UTL_SMTP.open_connection(co_smtp_server, 25);
  --establish the connection
  --The snapon based smtp host is smtp.snapbs.com
--The default smtp port being 25
  UTL_SMTP.helo(l_mail_conn, co_smtp_server);
  UTL_SMTP.mail(l_mail_conn, in_sender);
  --Incase we have multiple recipients ,we need to loop through the recipient  ,invoking
  --utl_smtp.rcpt once for each recipient ,mutiple recipien
    FOR i IN ( SELECT REGEXP_SUBSTR (l_send_email_add, '[^,]+', 1, LEVEL) AS recipient  -- Replaced in_recipients with l_send_email_add
                FROM DUAL
                 CONNECT BY REGEXP_SUBSTR (l_send_email_add, '[^,]+', 1, LEVEL) IS NOT NULL )
    LOOP
    UTL_SMTP.rcpt (l_mail_conn, i.recipient );
    --using the same connection established to send mails to multiple recipients
    END LOOP;
  UTL_SMTP.open_data(l_mail_conn);
  UTL_SMTP.WRITE_DATA(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || UTL_TCP.CRLF);
  UTL_SMTP.WRITE_DATA(l_mail_conn, 'To: ' || IN_RECIPIENTS || UTL_TCP.CRLF);
  UTL_SMTP.WRITE_DATA(l_mail_conn, 'Cc: ' || IN_CC|| UTL_TCP.CRLF); 
  UTL_SMTP.write_data(l_mail_conn, 'Bcc: ' || in_bcc|| UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'From: ' || in_sender || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || in_subject || UTL_TCP.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Reply-To: ' || in_sender || UTL_TCP.crlf);
  utl_smtp.write_data(l_mail_conn, 'MIME-Version: 1.0' || utl_tcp.crlf);
  UTL_SMTP.write_data(l_mail_conn, 'Content-Type: multipart/mixed; boundary="' || co_msg_boundary || '"' || UTL_TCP.crlf || UTL_TCP.crlf);--Ref#3
  if in_message is not null then
    UTL_SMTP.write_data(l_mail_conn, '--' || co_msg_boundary || UTL_TCP.crlf);
    UTL_SMTP.write_data(l_mail_conn, 'Content-Type: text/plain; charset="iso-8859-1"' || UTL_TCP.crlf || UTL_TCP.crlf);
    UTL_SMTP.write_data(l_mail_conn, in_message);
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);
END IF;
  out_mail_conn:=l_mail_conn;
  ELSE
  RAISE e_invalid_email_add;
  END IF;
2. Add_mail_attachment-To add the attachment to the e-mail , the code is below
PROCEDURE add_mail_attachment
              in_att_mime_type  in  varchar2 character set any_cs default 'text/plain; charset=us-ascii',
              in_attachment     IN  BLOB ,
              in_att_file_name  in  varchar2 character set any_cs default null,
              in_mail_conn      IN  UTL_SMTP.CONNECTION
IS
l_mail_conn       utl_smtp.connection;
l_step            PLS_INTEGER  :=24573;
BEGIN
    l_mail_conn:=in_mail_conn;
    if in_att_file_name is not null then
      UTL_SMTP.write_data(l_mail_conn, '--' || co_msg_boundary || UTL_TCP.crlf);
      utl_smtp.write_data(l_mail_conn, 'Content-Type: ' || in_att_mime_type || '; name="' || in_att_file_name || '"' || utl_tcp.crlf);
      UTL_SMTP.write_data(l_mail_conn, 'Content-Transfer-Encoding: base64' || UTL_TCP.crlf);
      UTL_SMTP.write_data(l_mail_conn, 'Content-Disposition: attachment; filename="' || in_att_file_name || '"' || UTL_TCP.crlf || UTL_TCP.crlf);
      for i in 0 .. trunc((dbms_lob.getlength(in_attachment) - 1 )/l_step) loop
             UTL_SMTP.write_data(l_mail_conn, DBMS_LOB.substr(in_attachment, l_step, i * l_step + 1));--UTL_SMTP.write_data(l_mail_conn, UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(DBMS_LOB.substr(in_attachment, l_step, i * l_step + 1))));
      END LOOP;
      utl_smtp.write_data(l_mail_conn, utl_tcp.crlf || utl_tcp.crlf);
end if;
end;
--I have skipped the exception part
3.Close_mail () - This procedure closes the connection and sends the e-mail , the code is as follows
PROCEDURE close_mail(
                    in_mail_con IN  UTL_SMTP.CONNECTION
is
l_mail_conn       UTL_SMTP.CONNECTION;
begin
    l_mail_conn:=in_mail_con;
    UTL_SMTP.write_data(l_mail_conn, '--' || co_msg_boundary || '--' || utl_tcp.crlf);
    --Indicates that the e-mail message is complete
    UTL_SMTP.close_data(l_mail_conn);
    --Quit the connection
    UTL_SMTP.quit(l_mail_conn);
END;
--This is the complete code , Can you suggest where i am erring?
I am not able to send e-mails after attaching images.
The e-mail is sent but the attachment is empty.
I have skipped the exception part of the code

Similar Messages

  • Using header paramter SHeaderX-MS-HAS-ATTACH  in Sender mail adapter

    I am trying to check if an e-mail contains attachment in reciever determintion
    I set the Variable Header XHeaderName1 to be SHeaderX-MS-HAS-ATTACH
    in Sender mail adapter
    I added a condition in the receving determintation
    XHeaderName1 = yes
    I see the DynamicConfiguration tab in sxmb_moni and the value of SHeaderX-MS-HAS-ATTACH is "yes"
    but the message fails with the error
    No receiver could be determined
    any ideas?

    Hi,
    In Receiver determination you need to set SHeaderX-MS-HAS-ATTACH = yes instead of XHeaderName1.
    As far my understanding, in receiver determination you need to verify the condition with  SHeaderX-MS-HAS-ATTACH = yes (check with syntax also ie. case sensitive and all)
    Thanks
    Swarup

  • "View in Place" inline images and PDFs in Yosemite Mail

    I'd like to have the "View in Place" option available for images and PDFs, but it appears to be missing in Yosemite Mail. It would be particularly helpful with this new Markup feature. Any ideas how I might do this?

    When I drag a PDF or an image (TIFF, JPEG, etc.) into the body of an Apple Mail message, I see an icon of that file.
    There used to be a contextual menu option to "View as Icon" or "View as Image" in previous iterations of Mail, but now with Yosemite, I am only able to send the message with the image or PDF file viewed as an icon. As a comparison, when Composing a message in the Gmail desktop web interface, you can click on the Insert Image Icon, and you are given the option to insert the image "Inline" or "As attachment." I like having both options and I wonder if there is a Terminal command or third-party solution to restore this functionality.

  • How to open a pdf attachment in imac mail

    I am unable to open a PDF attachment in Mac Mail. There is not a PDF Icon in the email message. Is there a setting that should be checked?
    I have a new iMac (less than a month old) with Mountain Lion.
    Help would be greatly appreciated. Thanks

    It is an actual PDF that is an attachment to an email. There is not a link to click on to open the attachment.
    The attachment is a statement that I normally open, then print..
    What I am seeing on the monitor is the heading portion of the email with the statement image, all on one page..It prints exactly as seen on the screen.
    I have checked my Mail>Preferences>Viewing Tab."Display remote images in HTML" messages is checked..
    Thanks for the help.

  • Missing attachment size in mail 4.3

    Hi, when I attach a jpeg to an email, I can see the size of the attachment at the bottom of the window but when I attach a pdf, the 'message size' and 'image size' are both missing. Please does anybody know if this is standard or do I have a problem?

    Stuart,
    The problem in the earlier version of Mail was that if the Image Size button were used with PDF, to anything other than Actual Size, the PDF was converted to a JPEG and havoc resulted. It was very purposefully removed in later versions of Mail unless true image files that could be downsized as JPEG files were what were attached. I know this because I was one who pointed out the error that could result. The resizing was prevented in the final Version of Mail 2.x, but the Message size Report and Image Size button were not removed when attaching PDF until Mail 3.x and later.
    The current behavior is not a bug, and the Message Size was only meant to appear when Image Size button could be used to reduce the size of the files, and thus the entire message.
    Ernie
    Message was edited by: Ernie Stamper

  • Picture attachment problems in Mail

    Since upgrading I have had a number of email recipients telling me I have not attached the images I had intended to send them. The images are attached (jpgs) and I am sending the emails as plain text. I am also making sure the attachment is viewed as an icon. What can be going wrong?

    Jezzah wrote:
    I am also making sure the attachment is viewed as an icon.
    That setting is just for your local view.
    What you can do: compress the images in Finder to a ZIP file (right click on the file and hit "Compress ....", than they are showed as a normal attachment on the receivers computer.
    There is also a little plugin for Apple Mail called Attachment Tamer where you could decide if the pictures are send as a real attachment or an embedded picture. You can test that shareware for a few days to decide.

  • How do i resize photo attachment in icloud mail

    How do I resize photo attachment in icloud mail. The resize button does not appear as it did  before.

    Using iCloud mail online via a browser does not offer the option to resize the photo.  It's only available when emailing from iPhoto so iPhoto can do the resizing as it adds the image to the email.  Safari or whatever browser you're using doesn't have that capability.
    OT

  • Image as attachment to email

    Hi all,
    I am trying to attach an image to email. I would like to have the image attached as a file, not embeded inside the email. In the past, the solution was to select "view image as icon". However, in Lion the email behaves very inconsitently. Sometimes, the image becomes in Outlook clients (that majority of my recipients use) as a tiny image, that cannot be saved. Sometimes, the image is actually attached as a file and sometimes it's embedded with the original size. It does not seem to be related to whether the email is a plain or rich text.
    Please, does anybody have a solution?

    etresoft wrote:
    Adam Nohejl wrote:
    I wouldn't say it is entirely an Outlook problem. The images that you can't extract in Outlook technically aren't sent as attachments, but as "related mime parts" (or embedded images),
    A related MIME part is an attachment. As soon as you "attach" a file or image, turn on boldface or italic, or do anything that makes your e-mail the least bit fancy, you are creating one or more attachments.
    This may be a terminological misunderstanding. Here's what I mean by attachments and MIME parts:
    Turning on boldface or italic usually results in an creation of two "alternative" MIME parts. Attaching files results in additional "mixed" mime MIME parts (usually with an "attachment" content disposition), which are attachments. But embedded images sent as "related" mime parts form an "aggregate object" together with the HTML part (see RFC 2387), although Apple Mail counts them as attachments.
    The terminology is explained in this two RFCs:
    http://www.faqs.org/rfcs/rfc2387.html
    http://www.faqs.org/rfcs/rfc1806.html
    The only difference is how Outlook interprets a multipart/related attachment whose first part is a text/html attachment.
    My reading of the RFCs is that if you want an email client to interpret images as separate entities (attachments) you should put them in a multipart/mixed parent part, not in a multipart/related parent part.
    When you send rich text (HTML) email using Mail, which contains images (and no non-images attachments) all images are sent as embedded images (using the HTML img element) using multipart/related.
    Initial indications are that it is much more difficult to get Lion to create plain text messages with attachments. Such messages aren't plain text at all and will be problematic for a different set of users.
    I haven't noticed any problems yet: I can change the format via the Format menu or permanently in the preferences. If I choose rich text and the message contains no formatting, it will be sent as plain text, but if you choose plain text, the message is always sent as plain text.
    Anyway, for sending plain text with attachments that displays correctly in Outlook I recommend the aforelinked post.
    It is a PC user problem.
    Most of my work revolves around email and mutual incompatibilities of various email software products. Some things are done right in Apple Mail, some in Thunderbird, and some (believe it or not) in Outlook. And none of the email clients is perfect. Outlook sure has a lot of flaws (interpreting multiple mixed text parts, interpreting CSS and HTML formating, interpreting HTML without any font specification, sending the nonstandard WINMAIL.DAT files, etc.), but I see the problem with embedded images mainly as an Apple Mail problem. Of course, it is just a matter of point of view as with any compatibility issues.

  • Display Image from Attachment?

    Using the sample file (AttachmentTest2_version8_launch_attachment_new.pdf) found here, http://209.46.39.53/thread/341433?decorator=print&displayFullThread=true, I'm using this for a form that also has an image field where the user clicks to add image to the form, and it works nicely, but would like to merge/combine it with the functionality of the image field where a user selects a pic and it displays on the form.  The image field did not give the option to be able to retrieve the pic when it was submitted, so I'm hoping to find a solution that once the user adds an image using the image field, that file could be automatically added to the attachment listing per the sample file.  In other words, in the sample, the user clicks 'add file' to select/add to list of files attached.  Is it possibe to capture the file and add as attachment from the image field, and then still be able to add additional attachments if needed.  The idea is to be able to display the image of whatever pic they have.  If there is a better way to accomplish, that would be great, and hope I've explained ok.  Thank you.

    Thank you, the 'add file' code that was in the sample (I believe it was your sample and it has been extremely helpful, thank you for posting it) for the button that is not working once distributed is pasted below - is this what is getting overridden in the distribution process, and if so, is there any way to modify to prevent that from happening?
    For the other issue of trying to find a way to auto add the image to the list of files is ok if not possible, we will just need to decide whether to distribute the form without the image showing and just collect in the list, or whether to have them insert the image and add to list.
    However, the 'add file' button not working once distributed will be a problem, and appreciate any help, thank you.
    Untitled.#subform[0].Button1::click - (JavaScript, client)
    var myDoc = event.target;
    var sFile = "myFile" + NumericField1.rawValue;
    myDoc.importDataObject({cName: sFile});
    var myDataObject = myDoc.getDataObject(sFile);
    var sFileName = myDataObject.path;
    ListBox1.addItem(sFileName,sFile);
    NumericField1.rawValue = NumericField1.rawValue + 1;

  • Attaching photos in mail on ios7

    In the old ios6 when attaching photos to mail you had the choice to resize the photos, this is now not available in ios7, see how it worked in ios6
    http://www.macobserver.com/tmo/article/how-to-email-multiple-images-in-ios
    Can anyone help

    You are right, this option seems to be gone. I am pretty sure this is a bug, though, because the option is not even appearing when I am using cellular data and I can't imagine Apple wants us to sent 3MB images over cellular. You should sent feedback about this ( http://www.apple.com/feedback/iphone.html ).

  • Am unable to attach my tiscali mail to my ipad

    Am unable to attach my tiscali mail to my ipad.  Have tried several ways but it always tells me that pop tiscali is not responding - can anyone help please?
    Sue

    Hello, ray15ekn. 
    Thank you for visiting Apple Support Communities. 
    Here is the best step by step guide on how to add your email account to your iPad mini. 
    iOS: Adding an email account
    http://support.apple.com/kb/ht4810
    Cheers,
    Jason H.

  • Attaching workitem to mail step

    Dear all,
    I am working on a scenario in which when ever Notification of Type 'N' is created , a workflow get triggered and the workitem goes for approval to a authorized person, now that person can  attach a note to that workitem and make rejection or approval at his wich.
    Now i want to send a mial to the user in SAP inbox only which should have the attachment that the approver has ,made..
    Is it possible if yes then please guide me.
    Thanks and Regards,
    Rachit khanna

    Hi Rachit,
    There are 2 options.
    One is adding the container element to the body of email sent to workflow.
    That is the reject reason entered by the manager is stored in a varaible and you can import that data into a container element and that container element can be added at task level to the body of mail, which will appear in the body of mail.
    Second option is using a SELFITEM-NOTE_CREATE instead of giving the manager an option to enter the reason.
    Allowing him to Enter the subject and body of the mail, which will be mandatory. You need to import attachment from the approval task to workflow and then that attachment to be exported to the mail task, which will have the attachment to the mail sent.
    Let, me know if you need more description or any other clarifications.
    bye,
    Sudhir.

  • Error while adding Image: ORA-00001: unique constraint

    Dear all,
    I have an error while adding images to MDM I can´t explain. I want to add 7231 images. About 6983 run fine. The rest throws this error.
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8078_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8078.gif; ArraySize=0; NullInd=0;
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8085_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8085.gif; ArraySize=0; NullInd=0;
    I checked all data. There is no such dataset in the database. Can anybody give me a hint how to avoid this error.
    One thing I wonder: The PermanentId is allways the same but I can´t do anything here.
    BR
    Roman
    Edited by: Roman Becker on Jan 13, 2009 12:59 AM

    Hi Ritam,
    For such issues, can you please create a new thread or directly email the author rather than dragging back up a very old thread, it is unlikely that the resolution would be the same as the database/application/etc releases would most probably be very different.
    For now I will close this thread as unanswered.
    SAP SRM Moderators.

  • How to download / read  text attachment  in Sender Mail Adapter  IN XI

    Hi
    I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
    Please help how to design / resolve this concept.
    Regards
    DSR

    I would like to know how to download / read text attachment in sender mail Adapter & sent same
    attachment to target system using file adapter.
    Take help from this blog:
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    From the blog:
    However in most cases
    our message will not be a part of the e-mail's payload but will be sent as a file attachment.
    Can XI's mail adapter handle such scenarios? Sure it can but with a little help
    from the PayloadSwapBean adapter module
    Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
    Regards,
    Abhishek.

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

Maybe you are looking for

  • IPod Shuffle 4th Generation's control buttons not working.

    My iPod Shuffle 4th Generation's control buttons are not working. Sometimes it works after formatting it stopped again.. Please give a solution ASAP...

  • My ipod touch 4th generation wont allow me to open the app store or itunes store

    so i have the ipod touch 4g 32gb has not been jailbreaked ever and works on ios 6.1.6 when i click on the app or itunes store apps on it it will just have the loading icon until it says request timed out i also cant login to imessages with out it tim

  • Operating system message: No such file or directory in DMS while archivng.

    Dear Team, While i am trying to make the archiving i am getting the error " Operating system message: No such file or directory" in DMS. I cross checked all the forums and made the settings as suggested still i am not able to resolve this. In fact it

  • ABAP + JAVA HA Installtion on Windows 2003

    Hello Everyone, We are in process of installation of ABAP + JAVA in HIgh Availability on windows server 2003 , oracle database. Our plan is to install ASCS, SCS, DB , CI on node A & DI on Node B. In Installation guide its given that " Central instanc

  • The peers of xMII

    Hi All, I worked with few automation/scada tools like wonderware, and heard about plc softwares like intellution, dianlogs etc. Is xMII meant to replace such scada softwares in shopfloors. I mean which are the softwares/tools that are currently used