Sending email and get delivery notification

Hi,
I want to send an email from HTMLDB and I see that the HTMLB mail package also use the utl_smtp package to implement this function. So I write a store procedure to send email with the help of utl_smtp and it works. Additional to every send I want a delivery confirmation to the sender adress, because it is very important to see, which mails weren't delivered. I've searched for an parameter to set and found these syntaxes in the "PL/SQL Packages and Types Reference".
UTL_SMTP.MAIL (
c IN OUT NOCOPY connection,
sender IN VARCHAR2,
parameters IN VARCHAR2 DEFAULT NULL);
UTL_SMTP.RCPT (
c IN OUT NOCOPY connection,
recipient IN VARCHAR2,
parameters IN VARCHAR2 DEFAULT NULL)
RETURN reply;
UTL_SMTP.RCPT (
c IN OUT NOCOPY connection,
recipient IN VARCHAR2,
parameters IN VARCHAR2 DEFAULT NULL);
The following statement stay in the Reference for the description of "parameters":
parameters The additional parameters to RCPT command as defined in Section 6 of [RFC1869]. It should follow the format of "XXX=XXX (XXX=XXX ....)".
I read a little bit about SMTP in RFC1869 and I write change the statements:
utl_smtp.mail(mail_conn,sender);
utl_smtp.rcpt(mail_conn,recipient);
to:
utl_smtp.mail(mail_conn,sender, 'NOTIFY="SUCCESS,FAILURE"');
utl_smtp.rcpt(mail_conn,recipient, 'NOTIFY="SUCCESS,FAILURE"');
I get now the following syntax error: "ORA-29279: SMTP permanent error: 501 Syntax Error"
I tried also the statement without success:
utl_smtp.mail(mail_conn,sender, 'NOTIFY=SUCCESS,FAILURE');
utl_smtp.rcpt(mail_conn,recipient, 'NOTIFY=SUCCESS,FAILURE');
What can I do to get this delivery confirmation. E.g. in Outlook is possible to set this as option for emails before you send it. Any ideeas?
Thanks!
Serban Vettori

Hi,
I read at first parts of RFC 1869 (stands in your documentation) but it doesn't help me too much because it wasn't a concrete example there. The best adress is the RFC1891 "SMTP Delivery Status Notifications", that contains a lot of examples like:
MAIL FROM:<[email protected]> RET=HDRS ENVID=QQ314159
<<< 250 ok
RCPT TO:<[email protected]> NOTIFY=FAILURE \ORCPT=rfc822;[email protected]
<<< 550 error - no such recipient
RCPT TO:<[email protected]> NOTIFY=SUCCESS,FAILURE \ORCPT=rfc822;[email protected]
<<< 250 recipient ok
DATA<<< 354 send message, end with '.'
(message goes here)
.<<< 250 message received
QUIT<<< 221 bye
Your documentation is realy good but in this case wasn't really helpful. If you implement a function it were nice to document any input parameter. The user have to read several other documents to get ONE parameter! I personally don't like this. Perhaps there are other users which are really exalted to see such cross references.
Here is the right syntax for this problem:
utl_smtp.rcpt(conn, recipient, 'NOTIFY=SUCCESS,FAILURE')
You get in this way delivery notifications on succeded and failed messages. If you just want to get a delivery success notification just assign the input variable "parameters" with this value: 'NOTIFY=SUCCESS'. There is also a third possible value you can choose: "DELAY". This mean "notify me, if there is an email sending delay".
Best regards,
Serban Vettori

Similar Messages

  • I am receiving emails fine but people sending emails are getting "This is an automatically generated Delivery Status Notification."

    So people sending me emails are getting this notification even though I am getting all of their emails.
    This is an automatically generated Delivery Status Notification.
    Delivery to the following recipients was aborted after 1 second(s):
    * [email protected]
    Reporting-MTA: dns; resqmta-po-10v.sys.comcast.net [96.114.154.169]
    Received-From-MTA: dns; resomta-po-03v.sys.comcast.net [96.114.154.227]
    Arrival-Date: Fri, 13 Mar 2015 00:11:39 +0000
    Final-recipient: rfc822; [email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: smtp; 550 5.1.1 Recipient address rejected: {Gateway}
    Last-attempt-Date: Fri, 13 Mar 2015 00:11:40 +0000
    Received: from [10.0.0.4] ([174.63.66.5])
    by resomta-po-03v.sys.comcast.net with comcast
    id 2oBe1q00S06oTie01oBfmR; Fri, 13 Mar 2015 00:11:39 +0000
    X-Authority-Analysis: v=2.1 cv=brXCBSqi c=1 sm=1 tr=0
    a=d75dIf30LeQD1RLuRZUoGw==:117 a=d75dIf30LeQD1RLuRZUoGw==:17 a=C_IRinGWAAAA:8
    a=GGcpBh7Jt_oA:10 a=73ab78M7B2EA:10 a=r77TgQKjGQsHNAKrUKIA:9
    a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=gZbpxnkM3yUA:10
    a=6BrDaJ5WXvREvQ-J4T4A:9 a=QEXdDO2ut3YA:10 a=jHBHo6-IVdtYVL4fa8AA:9
    a=_W_S_7VecoQA:10 a=qOu-Zh59HcEA:10 a=AfkkXffo6PgA:10 a=2rOyub8MfPoA:10
    a=MPPUs8NNPK4A:10
    Message-ID: <[email protected]>
    Date: Thu, 12 Mar 2015 20:11:31 -0400
    From: Michael Hamilton <[email protected]>
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
    MIME-Version: 1.0
    To: [email protected]
    Subject: test
    Content-Type: multipart/alternative;
    boundary="------------050909070108050106030501"

    I have sent you a test message.
    added: I got the same Notification from Comcast. If you go to the comcast website, is there a place to request an 'out of office' or 'vacation response'? If so, is that turned on?
    Did you receive my email?

  • TS3276 How do I send an email and get a receipt that they opened it? I have seen this before, but don't know what setting to go to.

    How do I send an email and get a recipt that they opened it?

    Additionally, even if Mail supported it, the recipient would have to allow/consent to sending you the receipt - if I were the recipient, I would certainly not allow it. If you are sending legal or other very important files, use the "return receipt required" feature of US Mail - you will get a receipt that it was accepted with a signature.

  • Sending email and alert notifcation using function module

    Hi All,
    I am trying to send email and alert notification messages using function modules in CRM. I am unable to send mail using 'SO_DOCUMENT_SEND_API1'. Getting a short dump message "dictionary mismatch". If anyone knows any FM which can be used for sending mails, please let me know. I also want to send alert messages using some FM. Please let me know any FM in this case as well.
    All help appreciated. This is urgent and please get back to me soon.
    Thanks
    Deno

    Hi Ranjit,
    Thanks a lot for the reply. I already tried these FMs and getting the error message
    Trigger Location of Runtime Error
        Program                                 SAPLBUPA_INTERFACE_TDTRANS
        Include                                 LBUPA_INTERFACE_TDTRANSTOP
        Row                                     4
    I dont know the reason behind the error. The SO_document_send FM is used inside all these FMs. So It wont work.
    Thanks
    Deno

  • When sending email I get this error message: An error occurred sending mail: The mail server sent an incorrect greeting: Cannot establish SSL with SMTP server

    This issue has popped up before then went away after I switched to SSL setings as suggested by my website host. Or...was it pure coincidence? Same problem today and I haven't made any changes since the above mentioned and have had many successful emails sent. Can't reply or send emails and the draft gets removed from the draft folder even if I saved it before hitting send. Thank you!

    Thank you Matt. I'm sure this will be frustrating ...but the more I think about this problem there more info I have to share. The emails I write that do not get sent do end up in my "sent" folder but never reach the recipient. And, most perplexing, the issue/problem is sporadic. It was coming and going before I switched over to the SSL/TLS option in T-bird. And...since the switch it has reappeared and disappeared. I have made zero changes other than the above mentioned. I did get a security update today for T-bird perhaps this will help?
    I read your link, thank you.
    I obviously don't understand how these systems work. I'm baffled how an issue like this can come and go...

  • Can't send email, keep getting ''a copy has been placed in your outbox. no password provided

    can't send email, keep getting '' a copy has been placed in your outbox. no password provided.
    please go to Mail account settings and enter a password" but i did !

    You have not stated who your email account is with. Go to their website, see if they have FAQ's or a forum and check if there is an existing post featuring the same problem. Keep us informed.

  • I cannot send emails. i get the sender address was rejected by the server

    i cannot send emails. i get the sender address was rejected by the server

    Greetings.
    Same issue...... can't determine what username and password are ?
    But, went thru process @ apple.com/support and changed port to 25.  :::::
    "Relaying denied" or "Email address rejected by the server" when you try to send email
    This error indicates that either an email address is incorrect or your settings aren't correct for your current connection. Make sure the email address is correct for messages in the Outbox or try a different port:
    If you're on a Wi-Fi network connected to the same network as your email domain, such as your Cable or DSL provider, try port 25:
    Tap Settings > Mail, Contacts, Calendars.
    Tap your email account, then tap Account.
    Scroll down and tap Outgoing Mail Server.
    Tap Primary Server, then tap Server Port.
    Delete the current port and enter 25.
    Tap Done.
    Now my iPhone5s is frozen in the "verifying" mode.  I can not stop it???????????????
    Now what?
    thank you
    cr

  • Problem sending emails and attachments on ios 6

    ever since i updated my iPad 2 to i.os 6, i can't seem to send emails and attachments. Also, the mail box doesn't get updated. I tried restoring it back again and readding my gmail account but no avail...please help ASAP!!

    thanks for your quick reply alan
    yea i have tried a reset...the mails don't seem to be sending..and in the outbox i get the error "sending message content to the server failed" or "an error occured while delivering this message" or "the connection to the outgoing server p-08-smtp.mail.me.com failed"...

  • Everyday this forum loses my email and I loose notifications

    I have posted this problem here and in the forum for forum problems.  NOTHING IS BEING DONE!!!!
    Is there anyone from MS who cares that this is happening or get in touch with someone that can help.  This happens about every second day.
    Between the problems with the forum not even showing and the email problem, I think the last update to this forum really screwed up!!!
    HELP!!!!!!!!!!!!!!!!!!!
    Lloyd Sheen

    Good topic. We're covering it over yonder:
    http://social.technet.microsoft.com/Forums/en-US/28c2ec72-c561-4a92-a052-e39216245472/everyday-this-forum-loses-my-email-and-i-loose-notifications?forum=reportabug
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • I can no longer send emails and my drafts folder no longer functions. How do I fix them?

    I am using Windows XP. I have Mozilla Firefox 3.6. My Gmail account no longer can send emails and my Drafts folder is inoperable. I can see, save, discard, or edit anything in Drafts. This is only with my home pc. Any other computer (library, work..) does work. How do I fix this?
    == This happened ==
    Every time Firefox opened
    == about a momth ago

    Please read and begin using Can receive email, but not send email. I had a similar issue with Comcast mail (could receive by not send) and found my answer in this letter. For me it took resetting the outgoing mail and telling the system to use a password when sending outgoing mail. If you need help with that please advise and I'll tell you where to look. 

  • I can no longer click on a link in email and get re-directed

    as far as I'm aware I haven't changed any settings - but I used to able to click on any type of link that came over on email and get into the appropriate website. I can no longer do this and I don't know why - can anyone help?

    Go to Tools>options>tabs>check the "open new windows in tab"
    or ctrl+click on the link ( always worked )

  • Hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.

    hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.
    i do not have a mac home pc. just a regular pc

    I had the same problem after I gave my old iPad to my parents and tried to install Netflix. This is what you have to do:  Open iTunes on your computer, the one you sync your iPad to. Then go to iTunes Store and search for and download Netflix app. After you download it, if your iPad is set to download new purchases it may start downloading on your iPad. If so, tap and hold to delete the app (because it is trying to install the new version on the iPad) Next step, go to the App Store on your iPad and find Netflix and it should say install since you already purchased it on the computer. Tap to install, and it will say the version is not compatible, tap to download a previous version. Click that and it will install the older version!    One more thing, if and when you sync to your computer again it will say something like " Unable to install Netflix on your iPad" Just click the box to never remind you again, because it's trying to sync the newer Netflix app to your iPad, but it doesn't work so it displays the message. The old app will remain on the ipad. Hope this helps, good luck

  • I keep trying to send emails and it says its rejected by the server because it doesn't allow relaying... Any ideas how to fix?

    I keep trying to send emails and it says its rejected by the server because it doesn't allow relaying... Any ideas how to fix?

    There is something else that can cause this issue. Check the outgoing mail server setting. Make sure that your username and password are in there.
    Settings>Mail, Contacts, Calendars>Your email account>Account>Outgoing mail server - tap the server name next to SMTP and check in the primary server and make sure your username and password are entered and correct - even if it says that the password is optional.

  • I have totallymessed up outlook on my ipad, attempted to change password, and then couldn't send email and now can't access at all.  can i reload "clean" new version and start all over?

    i have totallymessed up outlook on my ipad, attempted to change password, and then couldn't send email and now can't access at all.  can i reload "clean" new version and start all over?

    Settings>Mail, contacts, calendars>Your email account name>Delete Account. A window will popu after you select your email account in the settings and there is a large red Delete Button at the bottom of the window.
    Settings>Mail, contacts, calendars>Add account. Tap on Add account and start entering your email account details again. If your email account doesn't fit one the per installed accounts in there, tap on Other - and add your account in there.
    I would restart the iPad after you delete the email account, just to be starting "fresh" again.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button

  • One of my email accounts will not send email, and is not linked to data file.

    I have three email accounts set up with my Outlook 2010. All are POP3. All three accounts have been working fine, until the last day or so. One of my accounts will no longer allow me to send messages. When I go to my account settings, the two accounts that
    are working show the following:
    Selected account delivers new messages to the following locations:
    Email Address\Inbox
    in data file C:\...
    The one that doesn't work shows the following:
    Selected account delivers new messages to the following locations:
    My Name\Inbox
    The .ost data file for this email address is still in the same place, right next to the other two data files for the working accounts. For some reason, Outlook no longer has it linked to my account. How can I go about fixing this issue?
    Thanks.

    Hi Gwidion,
    Outlook 2010 and 2013 create PST per POP3 account. In simple, single PST file for single POP3 account. So, don’t be panic. Just change the location of the
    PST data file by following the given path in Outlook 2010:
    File >> Account Settings >>  Emails
    In the “Email” tab, choose the particular account which is not able to send emails and make a double click on it or click on
    “Change Folder” option. Finally, set the location of Email address.
    Hopefully it will help, otherwise simply recreate a new Outlook profile.
    For more:
    http://support.microsoft.com/kb/829918/en-us
    Thanks
    Clark Kent

Maybe you are looking for