Utl_mail.send_attach_varchar2 issue

If I try to execute package below on 10.2.0.2 (on Solaris 10), then the attachment I receive in the email has two rows where first row is empty and the second row has a text 200708, aaaa, xxxx
Any idea why? The attachment should have only one single row with text 200708, aaaa, xxxx why there are two rows and the first is empty?
BEGIN
utl_mail.send_attach_varchar2( sender => '[email protected]',
recipients =>'[email protected]',
subject => 'TEST',
message => 'This is a test',
attachment => '200708, aaaa, xxxx',
att_filename => 'test.txt');
END;

Interesting, I get the same results running your code. The attached file has a leading blank line. Double checking the mail file in a hex editor shows that there is indeed an extra CRLF preceding the text that should be the body of your message. This is probably a bug in the implementation of the UTL_MAIL package that you could request help with from customer support. If you don't want to go through customer support, your other option would be to fore go using UTL_MAIL and instead go straight to UTL_SMTP, or grab a copy of the DEMO_MAIL package from OTN.

Similar Messages

  • UTL_MAIL.send_attach_varchar2 add CrLf in attachment

    I'm having problems with UTL_MAIL... I need to send a RTF document attached to an email. But UTL_MAIL seems to add CrLf first in the attachement!
    If I try to send a realy simple file, just contailing 'Test' then the attachment will be chr(13)||chr(10)||Test. !!
    What ever is wrong, is wrong in this code snip...
    UTL_MAIL.send_attach_varchar2
    sender => '[email protected]',
    recipients => '[email protected]',
    subject => 'Log',
    MESSAGE => 'The attached file is the logfile. Please do not reply or respond to this e-mail, as it has been automatically generated.',
    attachment => 'Test',
    att_inline => FALSE,
    att_mime_type => 'application/octet',
    att_filename => 'log.txt'
    I have tried differnet Mime types and file names.... But nothing seems to help...
    I'm using a Oracle Xe 10.2.0.1.0.
    Can anybody explain whats failing???

    I don't know if this is the cause but why would anyone be on 10.2.0.1 this many years after so many patches have been released?
    Also consider attaching your file as raw rather than text. Does that solve the problem?

  • How to attach and email a text file using UTL_MAIL.SEND_ATTACH_VARCHAR2

    Hi im trying to attach a text file 'sample.txt' located in '\Test_Loc\New_Folder'
    Here is my code and my OS is Solaris and im using 10g R2
    CREATE OR REPLACE
    procedure test_v2 as
    Begin
    UTL_MAIL.SEND_ATTACH_VARCHAR2(
    sender => '[email protected]',
    recipients => '[email protected]',
    cc => null,
    bcc => NULL,
    subject => 'RE: Testing Attachment',
    message => 'TEST',
    mime_type => 'text/plain; charset=us-ascii',
    priority => 1,
    attachment =>'\Test_Loc\New_Folder\sample.txt',
    att_inline => TRUE,
    att_mime_type => 'application/octet' ,
    att_filename => 'demo.txt'
    end;
    Where am i going wrong? Please help me out
    Regards
    Vibhuti

    Hi,
    i can´t belive that no one is helping you out until now.
    If you found a Solution, let me know.
    I´m in search of the same Problem...
    Regards
    Lone

  • Getting bad argumnet error when using UTL_MAIL.SEND_ATTACH_VARCHAR2

    HI
    This is my code. I dont know what I am missing. Please advice. RK
    begin
    UTL_MAIL.SEND_ATTACH_VARCHAR2(
    sender => '[email protected]'
    ,recipients => '[email protected]'
    ,cc => null
    ,bcc => NULL
    ,subject => 'RE: Testing Attachment'
    ,message => 'Dear Providers: '
    || 'Let us know any changes in schedule'
    ,mime_type => 'text/plain; charset=us-ascii'
    ,priority => 1
    ,attachment => 'TEST'
    ,att_inline => TRUE
    ,att_mime_type => 'application_octet'
    ,att_filename => 'text.txt'
    end;
    ERROR at line 1:
    ORA-29261: bad argument
    ORA-06512: at "SYS.UTL_TCP", line 28
    ORA-06512: at "SYS.UTL_TCP", line 257
    ORA-06512: at "SYS.UTL_SMTP", line 116
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 228
    ORA-06512: at "SYS.UTL_MAIL", line 382
    ORA-06512: at line 3

    A new file text.doc will be created but is it possible to send already created file as an attachment file
    can u please mail me at [email protected]

  • How to attach multiple files in UTL_MAIL.SEND_ATTACH_VARCHAR2 method

    Hi all ,
    I had written a pl/sql where it will write multiple csvs i.e. a.csv,b.csv,c.csv,d.csv to a location using UTL_FILE to reports folder .
    How do i attach a.csv,b.csv,c.csv,d.csv into a single mail ??
    UTL_MAIL.send_attach_raw (sender => '[email protected]',
    recipients => 'recepient.com.sg',
    subject => 'Reports',
    MESSAGE => 'Reports are attached above',
    mime_type => 'text/html; charset=UTF8',
    attachment => a.csv,
    att_inline => FALSE,
    att_filename => file1
    Edited by: 907812 on 12-Jan-2012 23:03
    Edited by: 907812 on 12-Jan-2012 23:03
    Edited by: 907812 on 12-Jan-2012 23:04
    Edited by: 907812 on 12-Jan-2012 23:04

    UTL_MAIL does not work like that - you pointing to an external file and telling it to grab it and attached it to your e-mail.
    If you refer to the manual, the attachment parameter specifies it must contain the contents of the file.
    So your code needs to open the file. Your code needs to read the contents of the file. Your code needs to close the file. Your code needs to supply the contents text to UTL_MAIL via the attachment parameter.
    And as there is only a single attachment parameter, only a single file's contents can be supplied as attachment.
    Multiple attachments? Then you need to do what UTL_MAIL does. You need to write code that creates a valid e-mail Mime body. The Mime body must allow for multiple attachment. The Mime body needs to be delivered as an e-mail via the UTL_SMTP package.

  • How to attach a file in the utl_mail utility in oracle 10.2.0

    hi,
    where is the default file destination to attach a file in the utl_mail utility in oracle 10g. i have to send an attachment..
    regards,
    Deepak
    Edited by: Deepak_DBA on Nov 4, 2009 3:10 PM

    HI,
    I have succesfully created utl_mail and send mail.. but could not able to attach a file in that mail..
    i have used the procedure given below..
    DECLARE
    rfile VARCHAR2(255);
    BEGIN
    UTL_MAIL.send_attach_varchar2(sender =>'[email protected]',recipients =>'[email protected]',subject =>'Test new Mail',message => 'Oracle World',mime_type => 'text; charset=us-ascii',priority => 3,attachment => rfile,att_inline => TRUE,att_mime_type=> 'text/plain; charset=us-ascii',att_filename => 'i:\session.txt');
    END;
    regards,
    Deepak

  • Sending e-mail attachments with utl_mail.

    Hello guys i would like to add an attachment to an e-mail using utl_mail
    I have gotten this part done without a problem.
    My problem now is that i have to loop a table and make the contents of the table an attachment to the e-mail.
    So here is what i have so far.
    DECLARE
       b64   VARCHAR2 (512) := 'WELL THIS IS A WHOLE LOT OF DATA!';         -- etc., as above
       txt   VARCHAR2 (512) := 'Dear Scott: ...';                -- etc., as above
    BEGIN
       UTL_MAIL.send_attach_varchar2 (sender => 'xxxx'
                                    , recipients => [email protected].'
                                    , MESSAGE => txt
                                    , subject => 'Attachment demo'
                                    , att_mime_type => 'application/x-gzip'
                                    , attachment => b64
                                    , att_inline => TRUE
                                    , att_filename => 'hugo.txt'
    END;
    /and i have a loop like this.
    for rec in
       (SELECT
        FWTMP_REGPO_INV_NUM,
        FWTMP_REGPO_ERR_BAD_FUND,
        FWTMP_REGPO_ERR_BAD_ORGN,
        FWTMP_REGPO_ERR_BAD_PROG,
        FWTMP_REGPO_ERR_BAD_ACCT,
        FWTMP_REGPO_ERR_AMT_MORE,
        FWTMP_REGPO_ERR_NOPIDM_MATCH,
        FWTMP_REGPO_ERR_QTY_MORE,
        FWTMP_REGPO_ERR_ENC_LESS,
        FWTMP_REGPO_ERR_NOFP_MATCH,
        FWTMP_REGPO_ERR_NOFY_MATCH,
        FWTMP_REGPO_FTVFSYR_FSYR,
        FWTMP_REGPO_VEND_NUM,
        FWTMP_REGPO_ERR_INV_FOUND,
        FWTMP_REGPO_INV_AMT,
        FWTMP_REGPO_PO,
        fwtmp_regpo_credit_memo
    FROM FWTMP_REGPO_INTRFACE
    WHERE FWTMP_REGPO_ERR_IND = 'Y')
    loop
               utl_file.put_line(f,rpad(NVL('Invoice Number: '||rec.fwtmp_regpo_inv_num,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Fund Error: '||rec.FWTMP_REGPO_ERR_BAD_FUND,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Org Error: '||rec.FWTMP_REGPO_ERR_BAD_ORGN,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Program Error: '||rec.FWTMP_REGPO_ERR_BAD_PROG,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Account Error '||rec.FWTMP_REGPO_ERR_BAD_ACCT,'0'||' '),200)||CHR(13)
               ||rpad(('Amount Error: '||rec.FWTMP_REGPO_ERR_AMT_MORE||'0'),200)||CHR(13)
               ||rpad(('Vendor Error: '||rec.FWTMP_REGPO_ERR_NOPIDM_MATCH||'0'),200)||CHR(13)
               ||rpad(('Quantity Error: '||rec.FWTMP_REGPO_ERR_QTY_MORE||'0'),200)||CHR(13)
               ||rpad(('Encumbrance Error: '||rec.FWTMP_REGPO_ERR_ENC_LESS||'0'),200)||CHR(13)
               ||rpad(NVL('period Error: '||rec.FWTMP_REGPO_ERR_NOFP_MATCH,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Fiscal Year Error :'||rec.FWTMP_REGPO_ERR_NOFY_MATCH,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Vendor: '||rec.FWTMP_REGPO_VEND_NUM,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Invoice Error :'||rec.FWTMP_REGPO_ERR_INV_FOUND,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Amount: '||rec.FWTMP_REGPO_INV_AMT,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Po: '||rec.FWTMP_REGPO_PO,'0'||' '),200)||CHR(13)
               ||rpad(NVL('Credit memo: '||rec.fwtmp_regpo_credit_memo,'0'||' '),200)
               ||CHR(13)||'-------------------------------------------------------------------------------------------'||CHR(13));
        end loop;My challenge is simplly how to get the contents of the loop to the b64 variable. Any help would be greatly appreciated.
    Thanks
    Edited by: mlov83 on Sep 18, 2012 7:01 AM

    mlov83 wrote:
    I guess you have never been confused or frustuated. :-). That is why drinking copious amounts of coffee is important.
    A simple example of code goes a long way.
    SEND_ATTACH_VARCHAR2() call is explained in the documentation. Numerous source code examples can be easily found. Thus my criticism.
    The basic concept is - the attachment parameter contains the contents (e.g. file content, text content, image contents) and the filename parameter names that contents.
    Keep in mind that the document clearly states that the attachment data types are varchar2 and raw - both which are limited to 32KB. This means that larger attachment sizes will fail and that you need to use UTL_SMTP instead. Which is also documented in the same reference guide. And for which there are also a lot of examples.

  • Utl_mail attachments

    I'm using Oracle 10g, Linux Redhat.
    I spooled a query to the '/tmp/errlog.txt' and want to email the results.
    I'm using this statement to email the results.
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''smtp.fmi.com:25''';
    UTL_MAIL.SEND_ATTACH_VARCHAR2(
    sender => '[email protected]',
    recipients => '[email protected]',
    subject => 'PR1 Trigger Error Log',
    message => 'Attached is the PR1 Trigger Error Log',
    attachment => '/tmp/errlog.txt');
    END;
    I'm getting the email but the attachment?
    Any advice?
    Thanks in advance.

    The parameters that need to be provided are:
    attachment
    The manual says +"Text attachment+". In other words, the contents of the text file.
    att_mime_type
    Specifies the type of attachment. Default is plain text. Mime type can be html text, or in the case of binary attachments, pictures, video, audio and so on.
    att_filename
    What the attachment is called (e.g. filename). This does NOT mean point to a file somewhere on local disk (or the network) and the file automagically attaches itself to the e-mail.
    The result of this is a Mime body that contains both e-mail contents and attachment contents. Have a look at {message:id=4402801}. It shows how the actual Mime body (that constitutes the e-mail header, message and attachment) looks like.
    This is what you need to create using code... and then deliver using SMTP. The UTL_MAIL package is a very primitive (and poorly written) interface that creates such a Mime body for you and delivers it for you by calling the UTL_SMTP package.
    I suggest that you familiarise yourself with the basics of Mime and how attachments works and what the formatting requirements are. The easiest is crafting the type of e-mail that you want to send using your favourite mail reader and then e-mail that to yourself. After receiving that e-mail, look at the "source" view (raw format view) of that e-mail to see how it looks like.
    And what you see is what you will need to create - using UTL_MAIL to do it, or (even better), coding it yourself (e.g. HTML report e-mails with gif attachments that serve as embedded graphics in the e-mail, and so on).
    It is not that difficult. It simply requires basic understanding and not assuming that a parameter does something that is obviously does not do.

  • Utl_mail: how to send message as 'multipart/alternative'?

    Hi,
    I´m struggling with the following problem (I´m using Oracle XE on windows):
    I want to send an email via utl_mail in both HTML- and text-version, alternatively. I´ve played with different settings in utl_mail.SEND_ATTACH_VARCHAR2.
    But when I check the sourcecode in my mail-client, each mail is generated with content-type 'multipart/mixed' (even if I specify att_inline=>FALSE). Thus, the second version is always displayed as an attachment and my mailclient does not choose the best version.
    Is there any way to do this in utl_mail or will I have to use utl_smtp?
    This is my sourcecode:
    <blockquote>
    declare
    l_from varchar2(100) := ...;
    l_to varchar2(100) := ...;
    l_cc varchar2(4000) := ...;
    l_subject varchar2(100) := 'a multipart eMail via UTL_MAIL';
    l_mimetype_1 varchar2(100) := 'text/plain; charset=utf-8';
    l_body_1 varchar2(4000) := ...;
    l_mimetype_2 varchar2(100) := 'text/html; charset=utf-8';
    l_body_2 varchar2(4000) := ... ;
    begin
    utl_mail.SEND_ATTACH_VARCHAR2(SENDER=>l_from, RECIPIENTS=>l_to, CC=>l_cc
    ,BCC=>NULL, SUBJECT=>l_subject, MESSAGE=>l_body_1
    ,MIME_TYPE=>l_mimetype_1
    ,PRIORITY=>3
         ,ATTACHMENT=>l_body_2, att_inline=>FALSE,
         att_mime_type=>l_mimetype_2);
    end;
    </blockquote>
    Thanks,
    Jens

    I guess you'll have to use UTP_SMTP.
    Maybe you'll find helpful information over here: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805

  • Code for email on a button click

    hello,
    a have a form , with no of record. my requirment is when i click a button all records in that form email as an attachment.
    thanks
    yash

    Hi again yash :)
    have a form , with no of record.Then i would imagine an empty canvas free of records
    my requirment is when i click a button all records in that form email as an attachmentThen i would imagine a button on that canvas when u cilck all records that u said about (a form , with no of record.) u want to email the data displayed ...
    am confused now ... !!!
    u have to mention the form version & os pls.
    and i also have to mention that there are many sample code available on net to send the email through the db or a button..
    here is a successfull & Correct sample code u can try and follow the instructions given step by step exactly as mentioned in the following Link...
    Re: Issue in using UTL_MAIL.SEND_ATTACH_VARCHAR2
    Hope it helps ... :)
    Regards,
    Abdetu...

  • Run concurrent program one by one based on different parameter values.

    The PO report runs as a concurrent program, but this should launch another concurrent program to run after its execution based on its PO Number as parameter to the next concurrent program.
    while running this PO report, it should search the email id of vendor and sends the output of that report to respective vendors.
    Any help would be appreciated.
    Needed very urgently.
    Thanks,
    Atul
    Edited by: Atul on Jul 11, 2011 4:10 PM

    Hi Hussein,
    Thanks a lot for ur kind help.
    After getting through the many problems and errors, Now I am able to send an email with attachment :)
    But the thing is that, now i want to run PO report which will capture the approved PO's for the sysdate.
    So I will call this (PO Report) sub concurrent prog in my pl sql procedure(which is main concurrent program).
    when i will call the pl sql procedure that procedure should shoot an email of approved PO's onto the respective vendor's email address.
    So if on a day I am getting Ten approved PO's then it should send an email with PO Report's output as an attachment to the respective vendor email id
    So can u please tell me how to go about it.
    And how to call vendor email id's in "UTL_MAIL.send_attach_varchar2".
    Thanks,
    Atul

  • Send pdf email attachment

    Hi,
    I m running the custom concurrent program through pl-sql code and sending the output of the same conc program on to the email id of vendor.
    When i was tryng to send the output in text file it was allowing me to send the text message as well as attachment.
    But with the same code I want to send the pdf output.
    so earlier I was using the UTL_MAIL.send_attach_varchar2 .
    And for pdf attachment I am using the UTL_MAIL.send_attach_raw.
    So custom program is generating the output but
    while sending an email, it is not attaching the output into the email.
    What could be the problem.
    Please help as I needed it urgently.
    revert me if anyone has any query.
    Thanks,
    Bluetooth_25

    No it's not generating the .pdf file.
    It's only generating the .out file.
    so is that the possibility that it is not attaching the pdf in email.
    Here is my code:
    /*Variable declaration*/
    fhandle UTL_FILE.file_type;
    flen NUMBER;
    bsize NUMBER;
    ex BOOLEAN;
    vtextout RAW (32767);
    UTL_FILE.fgetattr ('EMAIL_OUTPUT','o'||v_request_id ||'.out',ex,flen,bsize);
    fhandle := UTL_FILE.fopen('EMAIL_OUTPUT','o'||v_request_id ||'.out', 'r');
    LOOP
    BEGIN
    UTL_FILE.get_raw (fhandle,vtextout,flen);
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    EXIT;
    END;
    END LOOP;
    UTL_FILE.fCLOSE(fhandle);
    FOR email_rec in c2_vendor_email_add(po_rec.po_header_id)
    LOOP
    UTL_MAIL.send_attach_raw
    sender => '[email protected]',
    recipients => email_rec.email_address,
    subject => 'Testmail',
    MESSAGE => 'This is test mail',
    attachment => vtextout,
    att_mime_type =>'application/pdf',
    att_filename =>'o'||v_request_id ||'.out'
    and i have one more question how to send an email to multiple recipients using utl_mail.send_attach_raw

  • Sending Email

    Dear All,
    I hv Used utl_mail package for sending mail, with attachement.
    and its Showing Successfully Send but not reaching the Destination.
    Codes are below
    BEGIN
    utl_mail.send_attach_varchar2
    (sender => 'deepak',
    recipients => '[email protected]',
    bcc => '[email protected]',
    subject => 'Test Mail',
    MESSAGE => 'Test Mail',
    mime_type => 'text; charset=us-ascii',
    priority => 3,
    attachment => 'TEst',
    att_inline => FALSE,
    att_mime_type => 'application/octet',
    att_filename =>'filename'
    END;
    please help me to Solve this
    thnkz
    Deepak
    Edited by: user8681779 on Sep 29, 2010 1:56 AM
    Edited by: Deepak on Oct 4, 2010 6:01 AM
    Edited by: Deepak on Oct 4, 2010 6:02 AM

    user8681779 wrote:
    BEGIN
    utl_mail.send_attach_varchar2
    (sender => 'deepak',Not a valid sender - this is used as parameter for the SMTP <i>MAIL FROM</i>) command. See RFC821 for details. The expected format is:
    +<[email protected]>+
    attachment => 'TEst',
    att_inline => FALSE,
    att_mime_type => 'application/octet',
    att_filename =>'D:\Deepak\Pendrive\Books\Paulo Coehlo\Veronika decides to die.pdf'Where is the PDF document you want to attach? You need to supply that as either a raw or varchar2 variable. You cannot point to an existing external file somewhere - UTL_MAIL will not read the contents of that file and attach it to the mail. That part you need to do. Read the external file (or CLOB/BLOB) and then pass the contents as a raw or varchar2 variable via the attachment parameter.

  • Please give me detailed explanation for this error

    dear all,
    i have created a procedue and used UTL_TCP utility.
    while executing this procedure always im getting this error.
    im very new to these utilities. pls help me in advance.
    error
    ORA-29261: bad argument
    ORA-06512: at "SYS.UTL_TCP", line 28
    ORA-06512: at "SYS.UTL_TCP", line 257
    ORA-06512: at "CCCL_29OCT07.O_DBEVENT_TRIGGER", line 231
    ORA-06512: at line 12
    thanks in advance

    Can we see what you actually did/tried to do?
    Also there are at least a couple of links for this error on Google, for example...
    Getting bad argumnet error when using UTL_MAIL.SEND_ATTACH_VARCHAR2
    http://asktom.oracle.com/pls/asktomf?p=100:11:0::::P11_QUESTION_ID:255615160805

  • Should we be 'Obfuscating'/wrapping our PL/SQL code?

    Versions:10gR2, 11G, 11GR2
    We are a software development firm in Retail Domain. We have around 35 packages, 80 procedures and functions. Currently none of our PL/SQL source codes are hiddent('obfuscated'). Is this a professional approach?
    If the client faces an issue with our code and when they send us the exp dump file to reproduce this issue. We wouldn't even be able see let alone debug the code. Right? Are there any other disadvantages with Obfuscation?

    Jiri in SF wrote:
    I would really appreciate of Oracle would provide code to their own packages. For example UTL_MAIL has issues for some SMTP servers, why I cannot take source code, improve it the way I want and then use it (of course I would not expect oracle to provide support for changed code).UTL_MAIL is perhaps a bad example. The code can be unwrapped - and the resulting source does not look good. The API itself is designed poorly IMO.
    Instead of rewriting UTL_MAIL, I would rather see it redesigned. For example, the existing API for example does not allow you to view the Mime payload to send via the DATA command at all. This is essential for debugging purposes.
    What about wanting to create a valid e-mail (Mime) that you want to deliver via another protocol (e.g. IMAP)? The API should enable you to create that and then select to use the payload without necessarily transmitting it via SMTP.
    Despite my dislike for Microsoft the company, I've always found their API sets logical, sensible and easy to use. Unfortunately the same can often not be said from the supplied PL/SQL package interfaces from Oracle. :-(

Maybe you are looking for

  • My Process status is in progress but all the subprocess are completed

    Hi, I have a problem, i started a process with 4 subprocess. One of the Subprocess didn't finish its activity and it's status remain "in progress". In the context data of subprocess i didn't see any information. Now if i try to suspend or cancel it i

  • Pages problem - Only two fonts available in the Fonts window.

    Hey there, Would love some help on this one. I am working in pages and when I bring up the Fonts window there are only two choices available (either with some text/object selected or not) - Helvetica 12.0 pt and Helvetica 9.0 pt. That's it. Nothing e

  • Install Snow Leopard for a specific mac

    Using the retail Snow Leopard disc, is there a way to force it to install all the needed parts for a specific mac? My example is: I have a Mac Mini I want to use to set up what will be a replacement hard drive for a MacBook Pro. I want to make sure t

  • LIS and Generic Extraction

    Hi All,          Could someone please send me some information regarding LIS extraction and Generic extraction. Thanks in advance, Sekhar

  • Catching Exception of a function in a procedure

    Hi, I have a procedure named P calling a function named F. If function F returns no value.. I want to catch that exception in the procedure/function itself and display to the user that the function named F has returned without any values. Thanks in a