[SOLVED] Sending mail from localhost

This is probably a newbie question so I will post it here.  I am trying to send a simple mail from localhost.  I don't own a domain and I don't need anything complicated.  I just have a script that if X case happens, my computer will send me an email notification.  I've done this before on Redhat systems at work but do not know how to set it up on arch.  On Redhat, I would simply just run the mail command with default settings and a mail would be sent from hostname@localhost to my target gmail address.  I installed s-nail and sendmail on my arch machine and when attempting to send a test mail using # echo "this is a test" |  mail -s test [email protected] , I receive the following messages in my journal:
Oct 13 14:47:07 arch-desktop sendmail[2341]: r9DJl7DH002341: to=[email protected], ctladdr=myusername (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30210, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Oct 13 14:47:07 arch-desktop sendmail[2341]: r9DJl7DH002341: from=myusername, size=210, class=0, nrcpts=1, msgid=<201310131947.r9DJl7DH002341@arch-desktop>, relay=whahn1983@localhost
Oct 13 14:47:07 arch-desktop sendmail[2341]: unable to qualify my own domain name (arch-desktop) -- using short name
Oct 13 14:46:07 arch-desktop sendmail[2341]: My unqualified host name (arch-desktop) unknown; sleeping for retry
I followed the sendmail setup instructions on the arch wiki page and used the default sendmail.mc file that was shown there.
Last edited by whahn1983 (2013-10-14 03:54:46)

I get the following errors when trying to install msmtp:
Packages (3): gsasl-1.8.0-2  msmtp-1.4.31-4  msmtp-mta-1.4.31-4
Total Installed Size:   1.97 MiB
:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                            [##############################] 100%
(3/3) checking package integrity                          [##############################] 100%
(3/3) loading package files                               [##############################] 100%
(3/3) checking for file conflicts                         [##############################] 100%
error: failed to commit transaction (conflicting files)
msmtp-mta: /usr/bin/sendmail exists in filesystem
Errors occurred, no packages were upgraded.

Similar Messages

  • Sending mail from local host

    hi, i am running my application in tomcat.
    if i specify a smtp host server name , could able to send a mail in same domain without using authenticator.
    But i want to know without specifying a smtp server name, is it posstion to send email using "localhost" as the server.
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtps");
    props.put("mail.smtp.host", smtpHost);
    Session session = Session.getDefaultInstance( props);
    MimeMessage message = new MimeMessage( session );
    message.setFrom( new InternetAddress(aFromEmailAddr) );
    message.addRecipient(
    Message.RecipientType.TO, new InternetAddress(aToEmailAddr)
    message.setSubject( aSubject );
    Multipart multipart = new MimeMultipart();
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setText(aBody);
    multipart.addBodyPart(messageBodyPart);
    MimeBodyPart attachmentBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(filePath);
    attachmentBodyPart.setDataHandler(new DataHandler(source));
    attachmentBodyPart.setFileName(fileName);
    multipart.addBodyPart(attachmentBodyPart);
    message.setContent(multipart);
    Transport.send( message );
    In my code if i mention a smtp server name in smtpHost , code is working fine, but i want to use localhost.
    so what will be the code for that??? should i have to configure anything.
    plz help.
    thnx in advance

    The code for sending mail from localhost is simply this:
    props.put("mail.smtp.host", "localhost"); But this will not work unless you have an SMTP server running on the same computer where that code is running. That's what "localhost" means. If you are trying to send e-mail without using a server which knows who you are, stop trying to do that. That makes you a spammer. Don't do it.

  • Cannot send mail from Exchange 2013 to Exchange 2007

    I have an
    Exchange 2007server with all roles in the same server (Version:
    08.03.0327.001 ) on a Windows 2008 R2 server. I have now installed two Exchange 2013 servers both with CAS and MBX roles on Windows 2012 servers
    (full patched). There is also a DAG between the new servers. All mail goes through a BorderWare besides the internal mail.
    I can send mail from both environments to the Internet. I can also send internal mail from Exchange 2007 to Exchange 2013.But the problem is that I am unable to send from Exchange 2013 to Exchange 2007. I've debugged, but not solved the problem and there are
    few articles on the Internet.
    Any suggestions?

    These two sentences are in conflict : "I can also send
    internal mail
    from Exchange
    2007 to
    Exchange 2013. But
    the problem is
    that I am unable
    to send from Exchange
    2007 to
    Exchange 2013. "
    Can you describe what is your real problem? Flow from E2007->E2013? Or vice versa?
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Damir

  • Error while sending mail from SAP

    Hello All,
    Recently we are facing an error while sending mail from SAP. When we try to compose a message ,it is moving to a dump error RAISE_EXCEPTION.
    The details from ST22,
    Short text
        Exception condition "FOLDER_NOT_EXIST" raised.
    Error analysis
        A RAISE statement in the program "SA
        condition "FOLDER_NOT_EXIST".
        Since the exception was not intercep
        program, processing was terminated.
    Kindly suggest..
    Thank You,
    Regards,
    Hasan

    Hello Priyanka,
    Actually, I performed the following two steps in order to solve the issue:
    - In transaction SICF, the node for SAPConnect must be active. In our system, this node was in inactive state. Hence I activated it.
    - Then In transaction SCOT-> Settings menu--> default domain should be 'xyz.com' if the email addresses in your company are maintained with a suffix  xyz.com.
    But for me the problem didnt get solved here..
    The problem that i am facing now is that if in my user profile, I have the email address maintained, then i get an error saying 'Sender address rejected'. However, if i goto transaction SU01 and clear the email id, the mail is successfully sent to outer world.
    You can try the above mentioned two steps using SICF and SCOT. If the problem does not get solved then try clearing the mail id in ur user profile.
    Hope this helps. If you find an answer to the problem of the mail id getting cleared, then please let me know..
    Regards,
    Himanshu

  • Can no longer send mail from other apps

    Problem:
    If I go into any app (other than Mail) and try to send a message (via email) and I either get nothing or some apps will say that "Mail needs to be configured in order to do this."  After doing a restore on my iPod touch (4th Gen., running the latest iOS5) I had only configured a few accounts under "Mail, Contacts, Calenddars", and *was* able to send mail from other apps just fine.  Now that I have 13 accounts I cannot; not only is Mail configured and working fine (by itself,) but I now only have one account with "Mail" activated, and it is indeed set as the "default account" in Settings anyhow.  This is frustrating since some apps depend on email to let me export its data but is also a nuisance since it makes it more difficult for me to share content with others.
    Has anyone encountered this bug and/or have a tip?

    It is possible the Evil Starbucks empire has blocked SMTP sending as an antispam measure. You would need to log in to your email server using the smtpauth protocol. For example, Earthlink has an smtpauth.earthlink.net server for secure sending, which I was able to use sending from any public AP. Possibly T-Mobile has a similar authorized server.
    But nowadays I just use Gmail, they make it easy and reliable to send from anywhere because they use a custom smtp port. Yeah, Gmail solved a multitude of problems with mobile sending.
    Aluminum PowerBook   Mac OS X (10.4.7)  

  • HT204075 I am not receiving mail to one of my email accounts. I can send mail from this account and all other accounts seem to be working.

    I am not receiving mail to one of my email accounts. I can send mail from this account and all other accounts seem to be working.

    Is this work email account on a BES server?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Can not send mail from PR Workflow to the approver

    Dear all,
    I have issues about send mail from PR Workflow to the approver.
    Now when user create PR and the corresponding user can receive the workflow items in SBWP.
    But no email from the user to approver.
    If I assign authorization SAP_ALL to the user that create PR. The approver can recieve the workflow item PR in SBWP and email to their mail
    Can you tell me about the authorization that can allow the user to send the workflow item PR in SBWP and email to the approver?
    Now user can send mail to external and internal mail and I also configured the mail server in SCOT and can successfully send a mail to users in SO01 by manually creating a message.
    Now the approver not receive any email but can receive a workflow item in SBWP
    Regards,
    Pannee

    Dear all,
    Thank you for all suppport, Now I can solve issues.
    Regards,
    Pannee

  • Sending Mail from workflow or updating container elements

    Dear friends,
    I'm new to work flow.
    My requirement: <b>send mail from workflow to a user after dead line is missed</b> I do not want to use messages in 'Latest end' tab. I want to send mail.
    The mail id of the user is determined in the previous step using a FM. How do I use this mail id to send the mail. I thought of using 'Rule' option in 'Send Mail' (and use same FM)but thats not possible. In that case how do I pass the mail id value to the WF container from the FM?
    I also tried this idea:
    created a task with BOR object SELFITEM, method 'SENDTASKDESCRIPTION' .
    *in an activity step used this task and filled the 'Rule' option in notification tab appropriately
    *in this case the WF goes into an error '.....error executing 'sendtaskdescription' .....'
    *i would prefer using the activity step because, the mail has to be sent after a delay
    Is there any other simple method to do this?
    My problem would be solved even if someone can show me how to transfer values from a FM into a WF container.
    Can someone please explain?

    Reposted under different thread

  • Problem while sending mail from SAP

    Hi ABAP gurus,
        I tried to send mail from SAP. For this we configured SMTP Services using the transaction SCOT and all are Completed.
      When I send a mail using SAPOffice it is Executing successfully and main is delivered to me.
       When I tried in  the program using the function module 'SO_NEW_DOCUMENT_SEND_API1' mail is not delivered to me but it is placed in SAPoffice outbox.The status of the mail says  "SEND PROCESS STILL RUNNING". Even when i execute SAPconnect manually mail is not transmitted.
       This is the transaction history of the mail.
      Trans. history  
    18.02.2006  13:44:31  Document sent 
                 13:44:31  Wait for communications service 
    After This stage Delivery attempt is not taking place.
    This is the Code
    ****Document DATA
    EMAIL_DATA-OBJ_NAME = 'MESSAGE'.
    EMAIL_DATA-OBJ_DESCR = SUBJECT.
    EMAIL_DATA-OBJ_LANGU = 'E'.
    EMAIL_DATA-SENSITIVTY = 'P'.
    EMAIL_DATA-OBJ_PRIO =  '1'.
    EMAIL_DATA-NO_CHANGE = 'X'.
    EMAIL_DATA-PRIORITY = '1'.
    ***Receiver
        EMAIL_SEND-RECEIVER = '[email protected]'.
        EMAIL_SEND-REC_TYPE = 'U'.
        EMAIL_SEND-EXPRESS = 'X'.
        APPEND EMAIL_SEND.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA              = EMAIL_DATA
              DOCUMENT_TYPE              = 'RAW'
              PUT_IN_OUTBOX              = 'X'
        IMPORTING
             SENT_TO_ALL                = SENT
             NEW_OBJECT_ID              = EMAIL_ID
         TABLES
              OBJECT_CONTENT             = EMAIL_TEXT
              RECEIVERS                  = EMAIL_SEND
         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.
    Please Help me to solve this Problem.
    Regards,
    Viswanath Babu.P.D

    Hi viswanath,
    1. in scot, in smtp node,
    2. press the internet button
    3. In ADDRESS AREA,
       type
       *yahoo.com
       *rediffmail.com
      etc,etc.
    4. Only when such domains are  entered,
       will sap send mail.
    5. It will not send any mail to other domains.
    6. Or simply enter *
    regards,
    amit m.

  • Function modules to send mails from ABAP

    hi
               can any one give me the function module to send mails from abap to yahoomail or gmail etc. i will be grateful if any one can provide me a sample code.
    thanks & regards
    rajesh

    Hi,
    check this site:
    http://www.sapdevelopment.co.uk/reporting/email/email_mbody.htm
    Replace the
    p_email(40)   type c default '[email protected]' .
    with ur yahoo or gmail id
    This is the FM that u needed:
    'SO_NEW_DOCUMENT_ATT_SEND_API1'
    http://www.kabai.com/abaps/z00.htm
    http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    /people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
    Hope this solves your question.
    Best Regards,
    Anjali

  • Why can I Only send mail from my iCloud Account and none of my others yet can receive from all ?

    why can I Only send mail from my iCloud Account and none of my others yet can receive from all ?

    Morning Allan ,sorry hit the wrong button. Thank you for responding . Meant to reply not notify you that my issue was solved . It's not . I imported all my settings via iTunes and all of the accounts receive mail as I said but can't send . Can you tell me exactly what to change with regard to my outgoing smtp. and PE the authentication ?

  • Sending mail from non-BT accounts

    I have email accounts with Apple (mobileMe), my own domain (hosted by Verio) and another of my own domains (hosted by Network Solutions) - as well as the BTinternet.com email account. 
    Until today, all four accounts were set up on my email client (Apple Mail) to use their own respective SMTP servers for outgoing mail, and all four have worked fine in this way for literally years. 
    This morning, I started getting error messages trying to send mail from the domain hosted by Verio ("cannot send message using the server [my own domain's SMTP server]").
    In the end, I followed the steps outlined in a thread on this forum to "add" the account to BTYahoo, verify it, and change the email client settings to use BT's SMTP server. So now it works fine.
    What I don't get is why I had to change this one account, when the other non-BT accounts (Apple and NS SMTP servers) continue to work fine as they are (ie using their own server details for outgoing mail).
    Anyone know the answer?  Obviously it works, so there's no problem (apart from wasting 2 hours this morning trying to figure out what the **bleep** had gone wrong), just curious as to BT's logic here.
    Solved!
    Go to Solution.

    gregch wrote:
    I have email accounts with Apple (mobileMe), my own domain (hosted by Verio) and another of my own domains (hosted by Network Solutions) - as well as the BTinternet.com email account. 
    Until today, all four accounts were set up on my email client (Apple Mail) to use their own respective SMTP servers for outgoing mail, and all four have worked fine in this way for literally years. 
    This morning, I started getting error messages trying to send mail from the domain hosted by Verio ("cannot send message using the server [my own domain's SMTP server]").
    In the end, I followed the steps outlined in a thread on this forum to "add" the account to BTYahoo, verify it, and change the email client settings to use BT's SMTP server. So now it works fine.
    What I don't get is why I had to change this one account, when the other non-BT accounts (Apple and NS SMTP servers) continue to work fine as they are (ie using their own server details for outgoing mail).
    Anyone know the answer?  Obviously it works, so there's no problem (apart from wasting 2 hours this morning trying to figure out what the **bleep** had gone wrong), just curious as to BT's logic here.
    Hi Gregch.
    To be honest, the problem seems to be at the destination smtp service end and nothing to do with BT. You've not really supplied any details of the error message - is there anything else in the received message ?
    You've assumed that it's a BT fault, rather than perhaps investigating the possible error at Verio. As the other accounts work as exists, it really does point at Verio (or indeed something local, perhaps a security package interferring etc).
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • Sending mail from workflow or Updating container from FM

    Dear friends,
    I'm new to work flow.
    My requirement: send mail from workflow to a user after dead line is missed I do not want to use messages in 'Latest end' tab. I want to send mail.
    The mail id of the user is determined in the previous step using a FM. How do I use this mail id to send the mail. I thought of using 'Rule' option in 'Send Mail' (and use same FM)but thats not possible. In that case how do I pass the mail id value to the WF container from the FM?
    I also tried this idea:
    created a task with BOR object SELFITEM, method 'SENDTASKDESCRIPTION' .
    *in an activity step used this task and filled the 'Rule' option in notification tab appropriately
    *in this case the WF goes into an error '.....error executing 'sendtaskdescription' .....'
    *i would prefer using the activity step because, the mail has to be sent after a delay
    Is there any other simple method to do this?
    My problem would be solved even if someone can show me how to transfer values from a FM into a WF container.
    Can someone please explain?

    Hi,
    => To get the deadline worked via programming, you can write your own logic. In current case,
    1. Create a custom function, having proper input and output parameters like End Time to wait if in case you have maximum of 2 days of wait.
    The total wait time is calculated from the Endtime, which is input to function module.  From the Endtime, the start date and end date are calculated and then the difference between the two dates is counted as total wait time.
    Here at the most 2 days of wait time is calculated.
    * Local parameters
      DATA: LV_UTCSTART TYPE /SDF/CMO_TSTMP,
            LV_UTCEND   TYPE /SDF/CMO_TSTMP,
            LV_SECOND   TYPE /SDF/CMO_SEC,
            LV_ENDDATE  TYPE SY-DATUM,
            LV_STR TYPE STRING.
      IF ENDTIME >= SY-UZEIT AND ENDTIME <= '235959'.
    *   Today's date
        LV_ENDDATE = SY-DATUM.
      ELSE.
    *   Tomorrow's date
        LV_ENDDATE = SY-DATUM + 1.
      ENDIF.
    * Get the Start Time for function module
      CONCATENATE SY-DATUM SY-UZEIT INTO LV_STR.
      MOVE LV_STR TO LV_UTCSTART.
      CLEAR LV_STR.
    * Get the End Time for function module
      CONCATENATE LV_ENDDATE ENDTIME INTO LV_STR.
      MOVE LV_STR TO LV_UTCEND.
      CLEAR LV_STR.
    * Get the total wait time in seconds
      CALL FUNCTION '/SDF/CMO_TIME_DIFF_GET'
        EXPORTING
          UTC_START = LV_UTCSTART
          UTC_END   = LV_UTCEND
        IMPORTING
          SECOND    = LV_SECOND
        EXCEPTIONS
          PARAMERR  = 1
          OTHERS    = 2.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Wait for total time
    WAIT UP TO LV_SECOND SECONDS.
    2. Now, create one method in the BOR object whose event triggers your workflow.
    3. Use this method in an activity step in you workflow where you want to wait on some given conditions.
    => You can use the email ID which was given by earlier step in Send Mail step. Just make your email id field as Export/Import <i><b>AD_SMTPADR</b></i> type of parameter. In the send mail, use this Id in Email Address input.
    Hope this helps your.
    PS If the answer solves  your query, plz close the thread by marking it Solved and rewarding each reply.
    Regards

  • Sending mail from DB - receiving empty mail

    Guys - Hope you doin well -
    I have a problem - i am sending mail from my db - i am using oracle 9i -
    the mail successfully sent to the receipent but with out any message - Below is the code that i am using to send mail -
    please help -
    create or replace package email is
    procedure send_mail(pi_frmadd in varchar2,
    pi_tooadd in varchar2,
    pi_subjct in varchar2,
    pi_msg in varchar2,
    pio_status in out nocopy varchar2);
    end email;
    show err
    create or replace package body email is
    g_maicon utl_smtp.connection;     
    procedure open_mail_server(pio_status in out nocopy varchar2) is
    l_maihst varchar2(100) := 'localhost';
    -- mail server IP address/name, instead of hardcoding this can be made a system parameter.
    begin
    pio_status := 'OK';
    g_maicon := utl_smtp.open_connection(l_maihst);
    utl_smtp.helo(g_maicon, l_maihst); -- perform initial handshake.
    exception
    when others then
    pio_status := substr(sqlerrm, 1, 200);
    end open_mail_server;
    procedure close_mail_server(pio_status in out nocopy varchar2) is
    begin
    pio_status := 'OK';
    utl_smtp.quit(g_maicon);
    exception
    when others then
    pio_status := substr(sqlerrm, 1, 200);
    end close_mail_server;
    procedure send_mail(pi_frmadd in varchar2,
    pi_tooadd in varchar2,
    pi_subjct in varchar2,
    pi_msg in varchar2,
    pio_status in out nocopy varchar2) is
    errexc exception;
    begin
    --< open connection >--
    pio_status := 'OK';
    open_mail_server(pio_status);
    if pio_status != 'OK' then
    raise errexc;
    end if;
    --< assign from and to >--
    utl_smtp.mail(g_maicon, pi_frmadd);
    utl_smtp.rcpt(g_maicon, pi_tooadd);
    --< create message text >--
    utl_smtp.open_data(g_maicon);
    utl_smtp.write_data(g_maicon, 'From: "' || pi_frmadd || '"<'
    || pi_frmadd || '>' || utl_tcp.crlf);
    utl_smtp.write_data(g_maicon, 'To: "' || pi_tooadd || '"<'
    || pi_tooadd || '>' || utl_tcp.crlf);
    utl_smtp.write_data(g_maicon, 'Subject: ' || pi_subjct || utl_tcp.crlf);
    utl_smtp.write_data(g_maicon, pi_msg);
    utl_smtp.close_data(g_maicon);
    --< close connection >--
    close_mail_server(pio_status);
    exception
    when errexc then
    return;
    when others then
    pio_status := substr(sqlerrm, 1, 200);
    end send_mail;
    end email;
    show err
    --Cut-paste the below code and execute it to send email from Oracle.
    --Specify the receipent e-mail ids.
    set serverout on size 1000000
    declare
    l_frmadd varchar2(100) := '[email protected]';
    l_tooadd varchar2(100) := '[email protected]';
    l_subjct varchar2(100) := 'Cool Oracle mail';
    l_msg varchar2(500) := 'You have received this mail from the database server BINGO!!' ||
    utl_tcp.crlf || 'Checking if the content is acceptable!!!' ;
    l_status varchar2(200);
    begin
    email.send_mail(l_frmadd, l_tooadd, l_subjct, l_msg, l_status);
    dbms_output.put_line(l_status);
    end;
    Your earlier replys would be highly appreciated - because this is some sort of an urgent request and i can't figure it out what is the problem - please consider ..
    YV.

    Vohra,
    Take a look at this AskTom thread -
    http://asktom.oracle.com/pls/ask/f?p=4950:8:17145199247327995192::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:255615160805
    It details how to use the utl_smtp package to send emails.
    I have to ask however, since you're not doing anything 'fancy' like adding email attachments, why aren't you using the (much simpler) htmldb_mail package to send email?

  • Reg : Sending mails from PL/SQL

    Hello,
    I've written the following code for sending mails from PL/SQL.
    But the application gets hanged during compilation itself. Could
    any of u please tell me why it's happening and what is wrong in
    this and suggest me how to do it ??????
    CREATE OR REPLACE PROCEDURE SEND_MAIL
    IS
    msg_from varchar2(50) := '[email protected]';
    msg_to varchar2(50) := '[email protected]';
    msg_subject varchar2(100) := 'E-Mail message from your database';
    msg_text varchar2(1000) := '';
    c utl_tcp.connection;
    rc integer;
    BEGIN
    c := utl_tcp.open_connection('172.16.48.1', 80); -- open the
    SMTP
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'HELO localhost');
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'DATA'); -- Start message body
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
    rc := utl_tcp.write_line(c, '');
    rc := utl_tcp.write_line(c, msg_text);
    rc := utl_tcp.write_line(c, '.'); -- End of message body
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'QUIT');
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    utl_tcp.close_connection(c); -- Close the connection
    EXCEPTION
    when others then
    raise_application_error(-20000,'Unable to send e-mail message
    from pl/sql');
    END;
    Awaiting for ur reply,
    Thanks in Advance...
    Srinivas

    FUNCTION Send_Mail ( sender IN VARCHAR2
         , recipient IN VARCHAR2
         , subject IN VARCHAR2
         , message IN VARCHAR2)
         RETURN BOOLEAN IS
         lv_mailhost VARCHAR2(30) := 'mailserver';
         l_mail_conn utl_smtp.connection;
         lv_crlf VARCHAR2(2):= CHR( 13 ) || CHR( 10 );
    BEGIN
         l_mail_conn := utl_smtp.open_connection ( lv_mailhost
              , 25);
         utl_smtp.helo ( l_mail_conn
                        , lv_mailhost);
         utl_smtp.mail ( l_mail_conn
                        , sender);
         utl_smtp.rcpt ( l_mail_conn
                        , recipient);
         utl_smtp.open_data (l_mail_conn);
         utl_smtp.write_data ( l_mail_conn
                                  , 'From: '
                                  || sender
                                  || lv_crlf);
         utl_smtp.write_data ( l_mail_conn
                                  , 'To: '
                                  || recipient
                                  || lv_crlf);
         utl_smtp.write_raw_data ( l_mail_conn
    utl_raw.cast_to_raw ( 'Subject:'
                        || subject
                        || lv_crlf));
         utl_smtp.write_raw_data ( l_mail_conn
    utl_raw.cast_to_raw ( lv_crlf
                        || message));
    utl_smtp.close_data(l_mail_conn);
         utl_smtp.quit(l_mail_conn);
         RETURN TRUE;
    EXCEPTION
         WHEN OTHERS
         THEN
              RETURN FALSE;
    END;

Maybe you are looking for

  • HT2534 I can't use my Apple ID on my iPod in the iTunes store. What do I do?

    What's happening is I made a new Apple ID and verified it, but then when I went to the iTunes store on my iPod it wouldn't let me use it. I don't know if I am doing anything wrong, but when I tried to sign in it said "This Apple ID has not been used

  • Dropdwon in a table view

    Hi All, I have started my application with this link. /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator However I have some questions. bit confused where Do I write the code that is mentioned below    GET_COLUMN_DEFINITI

  • Question about CS2 on Windows Vista 64 bit

    Hi! I am having the following problem with trying to use CS2 on a new machine running Windows Vista (64bit). Can anyone shed some light or suggest a solution? Thanks! I recently tried to install my CS2 suite on an HP G70t, running 64-bit Windows Vist

  • Camcorders for Final Cut Studio what to look for?

    Hi i am getting into motion graphics, green screening, and lots of effects. I have been trying to use my isight but it is so hard to key. I have a few question about camcorders as well. This is the only place i could think of to ask. Hears what i am

  • How can get the SAP MDM downloaded from  SAP Marketplace?

    Hi Experts, I have tried to download the MDM from the below link - http://service.sap.com/swdc > SAP Software Distribution Center > Download > Installations and Upgrades > Entry by Application Group > SAP NetWeaver > SAP MDM > SAP NetWeaver MDM 7.1 B