Use UTL_SMTP send mail charset thai

when I sent mail by use utl_smtp with thai language.
and I get mail ,I found ????????????? on email
sg := 'From:'||MSG_FROM||utl_tcp.crlf||
'To:'||MSG_TO||utl_tcp.crlf ||
'Subject:'||MSG_SUBJECT|| utl_tcp.crlf||utl_tcp.crlf||MSG_DETAIL;
-- Set Message format
utl_smtp.data(c,'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-Type: text/html; charset=utf-8' ||CHR(13)||CHR(10) || 'Content-Transfer-Encoding: 8bit'|| CHR(13)||CHR(10) ||msg);
utl_smtp.quit(c);
Help me

msg :=
--'Date:'||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss')|| utl_tcp.crlf||
'From:'||MSG_FROM||utl_tcp.crlf||
'To:'||MSG_TO||utl_tcp.crlf ||
'Subject:'||MSG_SUBJECT|| utl_tcp.crlf||utl_tcp.crlf||MSG_DETAIL;
-- Set Message format
-- utl_smtp.data(c,'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-Type: text/html; charset=utf-8' ||CHR(13)||CHR(10) || 'Content-Transfer-Encoding: 8bit'|| CHR(13)||CHR(10) ||msg);
utl_smtp.open_data(c);
-- utl_smtp.write_data(c,'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-Type: text/html; charset=utf-8' ||CHR(13)||CHR(10) || 'Content-Transfer-Encoding: 8bit'|| CHR(13)||CHR(10) ||msg);
utl_smtp.write_raw_data(c, utl_raw.cast_to_raw('MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-Type: text/html; charset=tis-620' ||CHR(13)||CHR(10) || 'Content-Transfer-Encoding: 8bit'|| CHR(13)||CHR(10) ||msg));
utl_smtp.close_data(c);
utl_smtp.quit(c);

Similar Messages

  • How to process a text file (mail attachment) using the sender mail adapter?

    Hi guys,
    Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
    Post please any thoughts or experience.
    Thanks,
    Olian

    Hi Olian,
    Have a look at these helpful links -
    1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
    2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
    3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Regards,
    Sunil Chandra

  • How to attach a document using the Send mail component

    Hello,
    I would like to know how to attach a document in a email using the Send mail component.
    There are these nodes into the atom but I don't know how to use it.
    <attachment doc="/ds/grp/doc" pltype="xml">
              <xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[@Role='S']/vpf:Msg/vpf:Body"/>
            </attachment>
    Does anyone know ?
    Thank you.

    Hello All,
    Regarding to the mail adapter, here are some updates:
    1. B1i will support sending HTML attachemnt via "Send Email" atom in B1 882 PL09. An example here:
    <attachment doc="test.htm" pltype="htm">
    <![CDATA[<html>
      <head>
        <title>Enter the title of your HTML document here</title>
      </head>
      <body>
        <p>Enter the body text of your HTML document here</p>
      </body>
    </html>]]>
    </attachment>
    2. In addition, B1i will support sending binary attachment and sending html content in Q1,2013.
    Thanks & Best Regards,
    Qiaoli

  • In my ipad email address which I am using for sending mail is appearing differently in the receipents mail box ! how to resolve that

    in my ipad email address which I am using for sending mail is appearing differently in the receipents mail box ! how to resolve that

    while sending a email in my ipad it is showing the correct email address([email protected]) in the ""from"" field but in receipients inbox ""from"" field it is showing another email id ([email protected])

  • Alias address from iCloud alias address cannot be used to send mails via iPad

    Alias address from iCloud alias address cannot be used to send mails via iPad

    If you still have this concern: You can only use the alias address linked to the main iCloud account that you backup your iPad to. You can check that going to Setting-iCloud and check the Account email address.
    I think this restriction is rather rediculous. I don't see why we can't configure an alias from a different iCloud account the same way we do for a Gmail account. I hope Apple fixes this in iOS 6.

  • How to determine the protocol to use in Sender mail Adapter ?

    Hi All
    Can i use my Microsoft Exhange Server address while configuring Sender Mail Adapter .? If yes , then which protocol i can use out of IMAP and POP ?..
    How do i determine which protocol i should use to connect to my exchange server ?
    Thanks
    rohan

    Hi Rohan,
    //Can i use my Microsoft Exhange Server address while configuring Sender Mail Adapter .?
    Yes, you can.
    //If yes , then which protocol i can use out of IMAP and POP ?..
    You can use either of them. To know more on IMAP and POP, i would suggest you go through these links,
    http://www.trincoll.edu/depts/cc/documentation/email/IMAP_vs_POP/default.htm
    http://www.imap.org/papers/imap.vs.pop.brief.html
    If your are using IMAP, you will have to specify, which folder from which you wnaty the emmail to be retrived, this is not needed for POP.
    Hope this helps,
    Regards,
    bhavesh

  • Which functiuon module we have to use  to send mail afetr finishing the job

    hi gurus
    can anyone suggest me
    how to send a mail after finishing the job
    which function module we have to use
    in reports
    in scripts
    in smartforms
    in bdc

    Hi Kalyan
    check this simple code to understand the logic:
    Convert spool to HTML and Email it.
    data: list type table of  abaplist with header line.
    data: htmllines type table of w3html with header line.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
    * Produce a list
      do 100 times.
        write:/ sy-index, at 30 sy-index, at 50 sy-index.
      enddo.
    * Save the list
      call function 'SAVE_LIST'
           tables
                listobject         = list
           exceptions
                list_index_invalid = 1
                others             = 2.
    * Convert the list
      call function 'WWW_LIST_TO_HTML'
           tables
                html = htmllines.
    * Send mail
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      loop at htmllines.
        mailtxt = htmllines.
        append mailtxt.
      endloop.
      mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
      if sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.

  • Using ODI send mail tool in procedure

    Hi,
    I want to use an ODI send mail option in procedure when certain condition is met.
    for example:
    I have one table "Dummy_table" as
    Dummy_table
    PRODUCTID
    PRODTYPE
    PRODCODE
    11111
    A
    11111
    22222
    A
    22222
    33333
    B
    33333
    00000
    A
    00000
    And a procedure which is trying to insert records in above table. In this procedure i want to add validation and when the validation is true, need to send mail.
    Mail to be triggered:
    If PRODUCTID already exists in table then do not insert record with same PRODUCTID in table. Instead of that, call an ODI send mail tool from the procedure which is trying to insert duplicate entry.
    Let's say my procedure is trying to insert record with PRODUCTID = "22222" . In this case, i dont want an entry to be inserted as it is already present. I want a mail to be triggered saying that this record is already present.
    Any help would be highly appreciated.
    Thanks in advance.
    Shilpa

    Sure, please follow the steps:
    1) First import one CKM to your project. If you are working with Oracle then you could use "CKM Oracle";
    2) Open your Interface and go to "Controls" tab and select your "CKM Oracle" in CKM Selector combo box. Pay attention to the CKM options and change them accordingly to your needs;
    3) Go to "Models" tab and search for your "Dummy_table" model;
    4) Expand "Dummy_table" model and right click "Constraints" -> New Condition
    5) Give it a name, select Type = "Oracle Data Integrator Condition" and then write down a SQL that will indicate which are the valid values that should be loaded to your target table. In your example, it should be something like this (DUM being the model table alias):
    DUM.PRODUCTID NOT IN (SELECT T1.PRODUCTID FROM Dummy_table T1)
    This query is telling ODI that only the rows with PRODUCTID that does not exists in the target table are valid. All the rest (in this case all rows that already exists in the target table) should be logged in E$ table.
    Please let me know if it worked.
    Thanks.

  • Can't send mail using - all send mail servers offline

    I am not able to send any mail.  I've got many SMTP servers and have tried them all.  none send and I don't get an error.  Have rebooted and read in discussions and find no solution.   OS X 10.9.2   Finding myself concerned that Apple's QA/QC is lacking.. not what it once one.  Seeing increasing instability in general in core OS X apps.

    Mail is a bit weird sometimes...
    Does your network/ISP allow SMTP traffic?
    Have you linked each SMTP server to the correct mail account?
    Have you selected "Use only this server" ?
    Have you checked the port number being used?
    What are the mail providers are you using?

  • MAIL - ERROR message using aapt sending mail

    I am using Apple Mail with an aapt.net.au email account. When I am at home using my wireless internet connection through an ADSL landline I have no problems. However, when I travel and make use of others wireless connections eg at an airport or at my friends house, I can receive and download email but I get a
    "server "mail.aapt.net.au" refused to allow a connection on port 25"
    error message when I try to send emails Aapt seem to have no idea what is happening.
    Does anyone out there in Mac land have any ideas.
    I use a Macbook when travelling.

    Hi Tim, it's a Port/Authentication issue when sending through another ISP.
    Make a New Location, Using network locations in Mac OS X ...
    http://docs.info.apple.com/article.html?artnum=106653
    * The SMTP port for outbound emails is 25 or 2525 (465 or 587 if you want to use secured SMTP)

  • Can I use my send mail account to authorize my other mac book pro

    I recentl;y purchased sendmail I find it perfect for my needs.. although it doesn't have an icon on my desktop (IMAC) I would also like to use it on my photo shoots on my mac book pro.
    There was not a serial number sent  that I can remember it just started working on the IMAC..as mention easy to use  and clients haven't complained and ;love the one click aspect and format  very fast as well.compared to Transmit..My question is can I authorize the additional macbook pro. ?

    Send now I'm sorry this is an acrobat Adobe product
    On Tue, Jun 10, 2014 at 9:44 AM, Ned Murphy <[email protected]>

  • Can GZIP compression be used when sending mail via EAS?

    I don't see a specific reference to this in the docs; thanks!

    Hi Josh i am getting the same error as krishna kumar. Below is my request 
    <?xml version="1.0" encoding="utf-8" ?>
    <SendMail xmlns="ComposeMail">
        <ClientId>61103135</ClientId>
        <SaveInSentItems />
        <Mime>BASE64_STRING_OF_MIME_DATA</Mime>
    </SendMail>
    Mime Data :
    From: [email protected] To:
    [email protected] Subject: hello MIME-Version: 1.0 Content-Type:text/plain; charset=\"iso-8859-1\" Content-Transfer-Encoding:7bit X-MimeOLE:Produced By Microsoft MimeOLE V6.00.2900.3350 This is the email body content.
    Response  :
    <SendMail xmlns="ComposeMail">
    <Status xmlns="ComposeMail">102</Status>
    </SendMail>
    Response Header:
        "Cache-Control" = private;
        "Content-Encoding" = gzip;
        "Content-Length" = 142;
        "Content-Type" = "application/vnd.ms-sync.wbxml";
        Date = "Tue, 10 Feb 2015 12:26:26 GMT";
        "MS-Server-ActiveSync" = "15.1";
        Server = "Microsoft-IIS/8.0";
        Vary = "Accept-Encoding";
        "X-AspNet-Version" = "4.0.30319";
        "X-BEServer" = BY2PR06MB903;
        "X-BackEndHttpStatus" = 200;
        "X-CalculatedBETarget" = "BY2PR06MB903.namprd06.prod.outlook.com";
        "X-DiagInfo" = BY2PR06MB903;
        "X-FEServer" = HKXPR06CA004;
        "X-MS-BackOffDuration" = "L/-470";
        "X-Powered-By" = "ASP.NET";
        "request-id" = "176a5d57-f5a5-433c-b929-f967b13566a2";

  • Error when using Variable Transport Binding in Sender Mail Adapter

    Hi,
    I am using the Sender Mail Adapter to receive an email, convert the attached tab delimited text file into xml and map it to an IDOC.
    I am using PayloadSwapBean and MessageTransformBean in order to do this, and this all works perfectly.
    I am now trying to access the Adapter Specific Message Attributes to retrieve the SHeaderFROM attribute from the message and map it to a field in the idoc.
    However when I check the "Variable Transport Binding" option in the Advanced tab of the mail adapter, the message no longer goes through to SXMB_MONI and I get the following error in the Java logs.
    Transmitting the message to endpoint http://sapserver:53500/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Error during parsing of SOAP header.
    Any ideas why this is happening?
    Thanks,
    Brad

    Hi Luciana,
    Honestly, I cant really remember how or if it was resolved and I was just helping out on the issue, but another consultant continued with it, so unfortunately I cant be any help on this.
    Good luck!
    Cheers,
    Brad

  • How to setup SMTP server  in PC so as to send mails using JavaMail

    Hi,
    From forums i got it cleared that we can use JavaMail to send emails. I also got two sample codes about getting it done. But in the code its asks address of the host of SMTP server. I dont have any SMTP server. But i am writing a Library Application in which an email must be sent to users automatically when thier books are in overdue.
    Where can i get SMTP server to be installed on my PC so that i can use it send mails through Javamail API.
    Thanks

    Isnt there any way setup SMTP server on own pc?? I just want to send mails in my local area network.

  • Delivery Receipt After Sending Mail Using JavaMail ?

    Hi Friends,
    I have written an application using JavaMail which would be used to send mail
    using my organisation's SMTP Server.I would like to include the following functionality in it.Just as
    Microsoft's Outlook has an option to get Delivery Receipt of the mail and Read Receipt of the mail sent
    (Provided the email Client supports it) i would like to have a similar option in my application to.I would like to of how i can do it using JavaMail.I heard that basically we need to set some SMTP properties which the Mail Transfer Agent would recognize and send us the Delivery and Read Receipts.But,i am not sure of what those properties.Can anyone help me regarding this ?

    You might look into creating a custom header that provides a return reciept to the email address you specify. I'm not 100% sure that all mail servers support this but you might want to look into it as a solution.
    -Dave

Maybe you are looking for

  • How can I convert an array with varying length into a cluster

    Hi, I need to convert an array of n elements into a cluster. Usually, it only involves the "Array to Cluster" function. But since the array length is not constant and the number of elements in the function is constant and can not be changed programat

  • How can I hide a subvi in the hierarchy window?

    I want to hide a subvi of my top level vi in the hierarchy window. I know by calling it dynamically that it won't be in the hierarchy window until it is called but I want to keep it in the hierarchy. I just don't want to display it in the hierarchy w

  • How to fix an ipod that is frozen

    my ipod start to turn differnt colors and when it turn back to its regular color then it froze and now i cant cut it off or type in my code to open it what should i do should i get it fix or do some else?

  • Possible bug in LR 5.2 "Reanalyze"

    I am noticing a glitch in the Lens Correction section, specifically using the Upright Perspective tool.  When copying setting from one photo to the other, and when the Auto Upright tool has been used,  the tool does not work correctly and will not wo

  • Post Quality refresh activity in SRM

    Dear Experts, We are nearing to quality refresh in SRM7.02. I need to know the details on Post Quality refresh activity in SRM 7.02. like configuration in quality after refresh etc. Please suggest. If you have any such documents ready please send it