Solved

sending email from oracle procedure

Posted on 2014-01-30
6
436 Views
Last Modified: 2014-01-31
Every this works fine. My question is when I am sending email I am getting the email address for sub center

get_email_rec.subcenter_email
This helps me to send email to sub centers pertaining to donors who are donating in that particular donor center. But I want to add my email also there

   url :=
     utl_url.ESCAPE
     (v_server_c || '?' || v_conn_str_c ||
       '&desformat=PDF&ENVID=' || v_report_db_c ||
       '&subject="WB Donors Eligible For Conversion"' ||
       '&destype=mail' ||
       '&FROM=someemail@mail.com&desname=' ||get_email_rec.subcenter_email||
       '&report='||v_letter||'&p_site_id='||get_rep_param_rec.site_id);

like abc@gmail.com. How can I add that after get_email_rec.subcenter_email

[attachment deleted by Zone Advisor at the request of asker]
0
Comment
Question by:anumoses
  • 3
  • 3
6 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 39820752
you could try simply appending it

 '&FROM=someemail@mail.com&desname=' ||get_email_rec.subcenter_email||'abc@gmail' ||

however, the web service you are using might not support it.
if that doesn't work, you'll need to contact the service host to determine what your options are.  You're not using an oracle feature, so it's not really something you can control from the oracle side.  You can only use the api provided.



If you want more control of sending email, you may have to do it yourself.
Fortunately, it's fairly easy to do so.

http://www.experts-exchange.com/Database/Oracle/A_7749-How-to-send-email-attachments-with-Oracle.html
0
 
LVL 6

Author Comment

by:anumoses
ID: 39821522
As you mentioned

you could try simply appending it

 '&FROM=someemail@mail.com&desname=' ||get_email_rec.subcenter_email||'abc@gmail' ||

does not work. Have to check with service host.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 39821549
I also wonder if it even makes sense to try what you have described.

By adding your address to the FROM line, you are trying to say the message is from two different addresses.

That doesn't make sense.  
You can send TO multiple addresses, but the message is only FROM one source

If you were sending TO multiple addresses, then maybe adding white space or a delimiter between each


||'  abc@gmail' ||

or

||',abc@gmail' ||
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 6

Author Comment

by:anumoses
ID: 39821559
&FROM=someemail@mail.com&desname=' ||'abc@gmail,xyz@gmail.com' ||

This works. But not the parameter
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 250 total points
ID: 39821567
>>> This works. But not the parameter

I don't know what you mean by that

also, if you're doing to append addresses, your first address probably needs a delimiter too


 ||',abc@gmail,xyz@gmail.com' ||
0
 
LVL 6

Author Closing Comment

by:anumoses
ID: 39824019
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now