Mail package in 10g

hi,
i have just compiled a package called UTL_MAIL from utlmail.sql as sys user
can i give priveleges to other users to access this package, coz i have failed in doing so
it gives an error , table/view doesnot exist
after i run the following command
grant execute on SYS.UTL_MAIL to HR;

UTL_MAIL,
The UTL_MAIL package provides a simple API to allow email to be sent from PL/SQL. In prior versions this was possible using the UTL_SMTP package, but this required knowledge of the SMTP protocol.
The package is loaded by running the following scripts:
CONN sys/password AS SYSDBA
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb
In addition the SMTP_OUT_SERVER parameter must be set to identify the SMTP server:
CONN sys/password AS SYSDBA
ALTER SYSTEM SET smtp_out_server='smtp.domain.com' SCOPE=SPFILE;
SHUTDOWN IMMEDIATE
STARTUP
With the configuration complete we can now send a mail using:
BEGIN
  UTL_MAIL.send(sender     => '[email protected]',
                recipients => '[email protected],[email protected]',
                cc         => '[email protected]',
                bcc        => '[email protected]',
                subject    => 'UTL_MAIL Test',
                message    => 'If you get this message it worked!');
END;
/Best Regards,
Francisco Munoz Alvarez
www.oraclenz.com

Similar Messages

  • Filter emails based on "From" of mail package

    My sender mail adapter is picking up all emails from an email account and processing the file attachment - This is working fine.
    The problem is that it processes everything sent to this email account even junk mails - resulting in XI alerts.  How can I ignore the junk emails and only process emails sent from a certain source???
    I see that we have "use mail package" and when I check this I get two payloads when I look in the monitor:
    PAYLOAD 1: MailMessage:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30" encoding="base64">
      <Subject>Test - use mail package</Subject>
      <From>"Wood, Lynn" email address removed</From>
      <To>"bcdinvoices, sapxd1" email address removed</To>
      <Content_Type>multipart/alternative;boundary="_000_91543CF4B231AE46B0B72867A9775AFE75E2BDB4B0SFLDMIEX001fe_"</Content_Type>
      <Date>2008-10-15T13:04:05Z</Date>
      <Message_ID><91543CF4B231AE46B0B72867A9775AFE75E2BDB4B0></Message_ID>
      <Content>LS1fMDAwXzkxNTQzQ0Y0QjIzMUFFNDZCMEI3Mjg2N0E5Nzc1QUZFNzVFMkJEQjRCMFNGTERNSUVY
    etc........
    RTc1RTJCREI0QjBTRkxETUlFWDAwMWZlXy0tDQo=</Content>
      </xim:Mail>
    PAYLOAD 2: MailAttachment-1 - which is my attachment with data which I process
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_BCD_INVOICES xmlns:ns="urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00">
    - <RECORDSET>
      <COST_CENTRE>90200955</COST_CENTRE>
      <EMPLOYEE_ID>66230</EMPLOYEE_ID>
      <PRODUCT_GROUP>VSP</PRODUCT_GROUP>
      <COMP_CODE>FEDERAL MOGUL FRICTION</COMP_CODE>
      <BCD_ACCOUNT>3301419</BCD_ACCOUNT>
      <INVOICE_DATE>20080811</INVOICE_DATE>
      <TRAVELER_NAME>PIERREY</TRAVELER_NAME>
      <TRAVELER_FIRST_NAME>JEAN FRANCOIS</TRAVELER_FIRST_NAME>
      <INVOICE_NO>8212654</INVOICE_NO>
      <AMOUNT_EXCL_VAT>15.00</AMOUNT_EXCL_VAT>
      <CURRENCY1>EUR</CURRENCY1>
      <AMOUNT_VAT>0.00</AMOUNT_VAT>
      <CURRENCY2>EUR</CURRENCY2>
      <AMOUNT_DOC_CURRENCY>15.00</AMOUNT_DOC_CURRENCY>
      <CURRENCY3>EUR</CURRENCY3>
      </RECORDSET>
      </ns:MT_BCD_INVOICES>
    Can I pick out   <From>"Wood, Lynn" email address removed</From>
    To check it is the correct FROM  - ie. only process emails from a certain sender????
    Is this possible???  And how do I do it???
    I already use payloadSwapBean and messageTransformBean to swap the attachment for payload and to format the file.
    Please do not send me endless links to anything email related !

    Yes this is pretty much what I thought to do - my problem is what do I check in the UDF.  I need to get the "From" field into the header.  I see that you can do it if you check "Use Adapter Specific Message Attributes" and "Variable Transport Binding" then you have available in the header SHeaderFROM which you can then get in the mapping.  But we are on SP19 and we do not have "Variable Transport Binding" on the Sender Mail adapter - nor an advanced tab page - only an advanced mode check box and additional parameters.
    So not sure how I can get the "From" field into mapping???  Any ideas anyone?

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • Receiver Mail Adapter, Mail Package with Payload as Attachment

    Hi Everyone,
    I have spent the better part of the day today searching and testing all of the different combinations that I could think of to solve this problem, so please don't just do an SDN search for me and cut/paste in the links as there are too many contradictive answers piling up over the last year.
    I am trying to use a Receiver mail adapter to send some data using the mail package, and I want to have the <content> tag be in an attachment.  I am using mail package to dynamically set the mail address, but to also try and turn my data into a csv file that the recipient can open in Excel.
    My mail package sets the following values:
    <Content_Type>text/plain</Content_Type>
    <Content_Disposition>attachment</Content_Disposition>
    <Content>Sample Text</Content>
    This blog is basically what I am trying to do: 
    <a href="/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword:///people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    But no where in here is he setting ContentDisposition, and he is (potentially) not using the MessageTransformBean module.
    It is unclear if I need to use the MessageTransformBean to make this work? 
    Questions:
    1) Do I need to use the MessageTransformBean?
    2) Do I need to set the ContentDisposition in the mail package?
    3) Does Service Pack matter with these settings?  We are on SP15 upgrading to SP18 very soon.
    Thanks
    Peter

    Hi Peter,
    try:
    <Content_Type>text/plain;name="file.csv"</Content_Type>
    <Content_Disposition>attachment;filename="file.csv"</Content_Disposition>
    <Content>Sample Text</Content>
    Regards
    Stefan

  • PayloadZIPBean with Mail Package... is it possible?

    Hi,
    In proxy to file scenario, I send mails from PI with data received from proxy as attachment. I also need to zip the attachment.
    I will be getting the email address dynamically, hence I should use Mail Package with 'Keep Attachments' option. Now the problem is if I use mail package since the <content> tag data is taken as mail attachment, can I use PayloadZipBean in receiver mail adapter to zip the attachemnt?
    I tried using the follwoing adapter module in receiver mail mail adapter but ended with an error.
    Module Name: AF_Modules/PayloadZipBean                             Module Key: zip
    Module Config:
    zip             zip.filenameKey                   payloadName
    zip             zip.mode                              zipOne
    Error:
    org.xml.sax.SAXParseException: Content is not allowed in prolog
    Regards,
    Sreedhar

    Hi Sreedhar,
        Have you looked at this help link?
    http://help.sap.com/saphelp_nwpi711/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm
    Also see :
    Zip Payload using PayloadZipBean Module Processor
    Regards,
    Ravi Kanth Talagana
    Edited by: Ravi Kanth Talagana on Oct 22, 2009 5:13 PM

  • Couldn't find delivery channel when using Mail-Package

    Hi,
    I use the mail receiver adapter. If I configure the mail header data (sender, receiver, subject) in the adapter configuration everything works fine. But now I need a dynamic subject, so I thought of using "mail package". But now I get an error "Couldn't find receiver channel for message..."
    The mail package looks like this:
      <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>[email protected]</Subject>
      <From>[email protected]</From>
      <To>[email protected]</To>
      <Content_Type>text/xml</Content_Type>
      <Content>This is my mail content</Content>
      </ns1:Mail>
    Has anyone an idea - thanks a lot - werner

    Hi Werner,
    some time ago I posted a weblogs
    which describes such a configuration
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    have a look at it
    BTW
    >>>>now I need a dynamic subject
    if you have sp14 or above then there's much
    easier method with adapter identifiers
    (then you can set the subject in message mapping )
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Mail Adapter: Working with mail packages

    Hi All
    I am having a receiver mail adapter.
    I am using mail package to send data as a text file attachment.I am getting the following error:
    failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found TM_Mail at state 1
    How can i override my current namespace with the recomended namespace 'http://sap.com/xi/XI/Mail/30}Mail'??
    Thanks
    Chandra

    I am trying to use the mail package as well and no e-mail delivered.  However,  when I do not use the mail package an use mail attribute and remove the code below it works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30"> 
    <subject>824 test</subject>
    <from>edi/@/na.modine.com</from>
    <to>s.m.posnanski/@/na.modine.com</to>
    <reply_to>edi_support/@/na.modine.com</reply_to>
    <content_Type>text/plain</content_Type>
    <content>
    Hello
    </content>
    </ns:Mail>
    Can some provide the settings that are needed in the Module tab when using the "Mail Package" option??

  • Error in mail adapter whilst using 'mail package' option

    Hello,
    I am using receiver mail adapter. Its working fine when I do not use 'mail package option'. But when I use mail package option, this error comes in
    Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: No data is allowed on this structure level (2) at XML element Mail,Subject
    This is the sample of payload:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>Data Update to  Portal failed</Subject>
      <From>sender email id/From>
      <To>receiver email id/To>
      <Reply_To />
      <Content_Type>text/plain</Content_Type>
      <Content>Error: Undefined Error</Content>
      </ns1:Mail>
    Any idea what should I do to get it working. Alternatively, is it possible to use the dynamic value into the email 'TO' field.
    Thanks in adavance

    Hi All,
    I need the same info in my requirement . The Scenario is MAIL > FILE . THe Vendor sends the email with  Invoices ( An Attachment) to a mail server and the attachment has to be moved to the network folder (File )
    Here , I used  IMAP4 Protocol in MAil Sender CC
    I wanted to know is it  required to use :localejbs/ AF_Modules/PayloadSwapBean and any module configuration to petch the attachment  ?

  • Error while using Mail Package for dynamic email address - XMLScanException

    Hi All,
        i am trying to implement File_to_Mail Scanrio. Here i am using mail package stuff to make use the dynamic mail Id's. i am following the blog /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address. i have finished all the settings as per the blog but it throwing the following error
    failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found Mail at state 1
    Please help me to resolve this error.
    Thanks in advance
    -Siva
    Edited by: Siva Ram on Jan 18, 2008 7:43 AM
    Edited by: Siva Ram on Jan 18, 2008 7:43 AM
    Edited by: Siva Ram on Jan 18, 2008 7:44 AM
    Edited by: Siva Ram on Jan 18, 2008 7:44 AM
    Edited by: Siva Ram on Jan 21, 2008 5:59 AM

    Hi Siva
    check with these threads discuss the same XMLScanException
    Mail adapter fails when using Mail Package Format
    Error in E-mail Adapter - Message protocol XIALL
    Mapping Error with mail package
    Error in Mail Adapter
    See the below links also
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Error in Mail Adapter
    Mapping Error with mail package
    Regards
    Abhishek

  • Error using javax.mail package

    Hi,
    I have included the package javax.mail.* in my code.I have downloaded
    jaf 1.0.2 and javamail 1.1.3 from the Sun Microsystems website.
    When i try to compile my code i get the error message:
    com/voxspectrum/ccvox/EmailServer.java:55: cannot resolve symbol
    symbol : class MimeMessage
    location: class com.voxspectrum.ccvox.EmailServer
    javax.mail.Message msg = new MimeMessage(session);
    I am using JDK ver 1.3.1_02. What should i set my path and classpath as, if i am using javax.mail package?
    Please could you help me out with this problem!

    Hi Nisha
    You need to include the path to the mail.jar and activation.jar files in your classpath.
    How you do it depends on the OS you are running on
    in Windows 95 /98 the easiest way is to edit the autoexec.bat file and add the settings to your already existing classpath statement i.e.
    set CLASSPATH=%CLASSPATH%;C:\richard\javamail-1.3\mail.jar C:\richard\jaf-1.0.2\activation.jar
    (excuse the word wrapping) then reboot
    on Linux / Solaris edit the .profile file for your user and set the CLASSPATH variable to
    CLASSPATH=$CLASSPATH:<pathtofile>/mail.jar:<pathtofile>/activation.jar
    export CLASSPATH
    and that should do it
    Hope this helps

  • Mail Receiver adapter - dynamic file name without mail package

    I know that we can get the dynamic attachment name using mail package... As per the FAQ Mail adapter, the Mail package use is deprecated and hence we do not want to go that route.
    I have seen the following wiki entry for setting the file attachment name...
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    Is this the only approach to dynamic attachment name using Mail adapter (and without Mail package). Or a different approach without Adapter module is possible?

    There is a different approach without using mail package or adapter module.
    Have a look at this Wiki:
    http://wiki.sdn.sap.com/wiki/display/ESOAInfrastructure/Dynamic+Email+Attachment+name+for+Received+Mails+with+ASMA+and+without+using+mail+package

  • Mail Adapter Use Mail Package, Mail Body and Attachment

    Hello
    Have some body a idea, how I can configure the mail adapter with use mail package, that I have in the mail a attachment with content from the messages and a mail body with also text from the message.
    Thanks for your reply.
    Regards Tom
    The different Weblog , I have check:
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

    Hi Thomas,
    If you are configuring your Mail adapter as reciever then refer
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    your sender (say file) should have some message like this
    <i>
    <ml:Mail xmlns:ml=’http://sap.com/xi/XI/Mail/30’>
       <Subject>Important</Subject>
       <From>[email protected]</From>
       <To>[email protected]</To>
       <X_Mailer>Outlook Express </X_Mailer>
       <Content>
       This is the content.
       </Content>
    </ml:Mail></i>
    And for Sender Mail Adpater
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Hope this will be helpful
    Regards
    Suraj

  • Mapping to Mail Package Content

    Hi,
    I'm trying to get information from an IDoc into the "Content" tag of the Mail Package structure. The format of the content should be a few values separated by semicolons and then "End Of Line" character after each line of values. Ex.
    <Content>VAL1;VAL2;VAL3 "EOL" VAL4;VAL5;VAL6 "EOL" VAL7;VAL8;VAL9</Content>
    The semicolons can easily be created using the concat function, but how do I get the EOL character in there so that the end result of the content attachment out of the Mail adapter becomes:
    VAL1;VAL2;VAL3
    VAL4;VAL5;VAL6
    VAL7;VAL8;VAL9
    So, in other words the result should be CSV with EOL characters.
    Solutions that work will be highly rewarded!!
    Thanks,
    Mattias

    write a simple UDF...
    the code in it would be just one line...
    return (""+ ((char)10) );
    i am assuming you want the "new line" at the end..right ?
    for new line it is "((char)10)"...for carriage return it is "((char)13)"...

  • How to maintain mail package option features with ASMA in mail adapter

    Hi Friends,
    While going through mail adapter sap notes I found that Mail package is deprecated, Can any one please give me an idea how to get these features that is header information (TO,From,Subject)  with ASMA(Adapter specific message attributes)
    Best Regards
    Raj

    This [link |Sender Mail Adapter ASMA issue - due to limitation of length upto 200 only.;address your issues... using header attributes length of the field < 200 might help.
    Have you seen help site
    http://help.sap.com/saphelp_nwpi71/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm

  • File to Mail using Mail Package

    Hello,
    I have a requirement where we receive a csv file having mutiple columns, one of them being the email address.
    I need to get this email address from the file and send this file as an attachment to the same email address.(Dynamic email address)
    I have used the Mail xsd and have done graphical mapping to achieve this.
    Now,the problem is,if I use Mail package for dynamic email address,I am not able to get the source file as an attachment because the payload here is a mail structure.
    If I get source file as an attachment using PayloadSwapBean and MessageTransformBean,I cannot have dynamic email address.
    Can anyone please suggest a solution to this?
    Thanks in advance for your help.
    Regards,
    Shweta

    Hi Stefan,
    Thanks for the reply.
    But I think,I am not able to understand the solution mentioned by you.
    I can find following fields in ASMA mail adapter:
    Meaning
    Technical name
    User
    TServerLocation
    Authentication Keys
    TAuthKey
    Mail header 'from' field
    THeaderFROM
    Mail header 'to' field
    THeaderTO
    Mail header 'Cc' field
    THeaderCC
    Mail header 'Bcc' field
    THeaderBCC
    Mail header 'subject' field
    THeaderSUBJECT
    Mail header field for reference to mail which is being replied to
    THeaderIN-REPLY-TO
    Mail header 'reply to' field
    THeaderREPLY-TO
    Mail header field for mail client program
    THeaderX-MAILER
    Mail header field for delivery acknowledgement
    THeaderDISPOSITION-NOTIFICATION-TO
    Mail header field for priority
    THeaderPRIORITY
    Mail header field for message importance
    THeaderIMPORTANCE
    I couldn't find a field related to attachments.
    I can see the xml version of file in inbound message in SXI_MONITOR.
    But after mapping,I get Mail package structure.
    Could you please explain again.Sorry for this.
    Thanks.
    Regards,
    Shweta

Maybe you are looking for

  • Can't delete IMG_0001.PNG

    Somewhere along the line, I hit the magic combination of buttons that takes a snapshot of the phone's screen as a .png file. However, when I tried to download this and some other pictures from the phone, both iPhoto and Image Capture claim that there

  • GR Non valuated

    I have to receive the stock to sloc and then issue goods to process order. But I would not pay for this stock and the one to whom the GI is made, is reponsible for his own account. Now, how do I tackle this scenario. Will GR non valuated in PO solve

  • How to move to the correct GL account.

    Hi All, I've the following account # 120151161 and there are two invoices booked to this account under 1101 GL account and they should be moved to the 1120888888. They are impacting the trade AR and they are not trade AR. So, pls advice me how can I

  • Budget check at IW31

    Dear All We want to do budget availability check at the time of IW31 maintenance order creation please guide Thanks in advance

  • Encore CS3 - Build error: "internal software error"

    Hi All, I'm fairly new to Encore but I've spend a lot of time figuring out how it works to the point that I think I've got it (menus, links, etc). Here's my problem:  I've exported a video with chapter points from Premiere CS3 into Encore (no problem