SQL & PL/SQL :: Sending UTL_SMTP Mail With JPG Picture As Header Inside Email?
Oct 7, 2013
I have to embed a picture as a header with an e-mail content for my work, I google'd and tested with different options but I failed. (The JPG is stored in a table as a blog object) When I tried with the below code the JPG file is e-mailed as an attachment with an e-mail content, I want it to be displayed inside an e-mail.
I tried att_inline: TRUE option as well - still not working.
Here is my code I tested and worked as an attachment.
I have a procedure called SANDEEP_INC105657, which calls another procedure called "Send_Prodcontrol_Mail_Pr". This procedure should be sending out an email with the following message:
Total number of records that needs slips printed are: 1
However what's happening is we had a database change from 10g to 11g and ever since this has happened the email is sent with "From", "Subject" and "To" but the body(content of the email : Total number of records that needs slips printed are: 1) is missing.The code in Send_prodcontrol_Mail_pr is as follows:
CREATE OR REPLACE PROCEDURE Send_Prodcontrol_Mail_Pr( v_mailhost IN VARCHAR2, v_sender IN VARCHAR2, v_recipient IN VARCHAR2, v_subject IN VARCHAR2, v_message1 IN VARCHAR2, v_message2 IN VARCHAR2, v_message3 IN VARCHAR2) [code]....
Any reason why the body of the email is missing? I tried the following:
replaced utl_smtp.data(mail_conn,mesg); with utl_smtp.write_data(mail_conn, utl_tcp.CRLF||mesg);
It sends out the email as required but it repeats the "From" two times with no "TO", and "Subject"... however then embeds the whole "from" "to" and the body in an email.
I have written a procedure to send a pdf file through mail. The directory was created and registered in SYS.DBA_DIRECTORIES with read,write grant access. But im getting the below error.
****** ORA-20014: Error in MAIL_FILES_PRO ORA-20012: Invalid Operation ORA-06512: at "ANAND.PRO_ICTPAYSLIPMAIL02", line 229 ORA-06512: at line 2 ******
I have learned procedure to send email with html attachment using UTL_SMTP protocol. But I could see the mailed attachment shows .Dat format. I need the attachment should go in .Html format.
find the below code which i am using:
CREATE OR REPLACE PROCEDURE send_email( pi_from in Varchar, pi_to in VARCHAR, pi_subj in VARCHAR, pi_msg CLOB )
We currently send mail via UTL_SMTP, we could easily switch to SMTP_MAIL but that is beside the point.
Our issue is that we have no way to find out what happens to mail we send to the MTA program, "smtpd". It is of my knowledge that the only information we can receive back from UTL_STMP is if the email address is invalid or if the email is going to be attempted to be forwarded by the MTA "smtpd".
We need the REAL data behind the scenes that "smtpd" is going to get after it attempts to forward an email from the database to GMail for example. We need "account does not exist" errors, and anything else that Google might have to say about us sending that address mail.
As far as I have researched there are no out of the box ways to send mail in this fashion.Could this be as simple as specifying the MX server for GMail? So for an email to a GMail account instead of connecting to localhost:25 for our SMTP server, we should connect to mx.googlemail.com:25?
how to setup receiving bounce messages through the database? We currently receive mail at the database box, and I think we can specify a special clob that will open one of the incoming mail files in RHEL to read for bounces.
BEGIN dbms_network_acl_admin.add_privilege (acl=> 'mails_senden.xml', principal=> 'USER2', is_grant=> true, privilege=> 'connect');
[code]....
USER1 sent a mail via UTL_SMTP successful whereas USER2 got the errors:
DECLARE * ERROR at line 1: ORA-24247: network access denied by access control list (ACL) ORA-06512: at "SYS.UTL_TCP", line 17 ORA-06512: at "SYS.UTL_TCP", line 267
[code]....
There is still the following fact:
USER1 has the role DBA, USER2 got the EXECUTE privilege to packages UTL_TCP, UTL_SMTP (GRANT from SYS).
IF the role DBA was granted to USER2 too then he couldt send emails just as well as USER1.
ERROR at line 1: ORA-29279: SMTP permanent error: 550 <account@test2.com[/email]> No such user here ORA-06512: at "SYS.UTL_SMTP", line 21 ORA-06512: at "SYS.UTL_SMTP", line 99 ORA-06512: at "SYS.UTL_SMTP", line 241 ORA-06512: at "SYS.UTL_MAIL", line 424 ORA-06512: at "SYS.UTL_MAIL", line 594 ORA-06512: at line 2
I need to create a forgot password page in which there will be two text box named user name and email id and user will provide his usename and email id in those text box. so apex will check that the provided name and email id are there in the data base and if email id corresponds to right user name then a mail will be send to that email Id containing auto generated password.
It send the email <32 k.But for >32 K it give me the error :
ORA-06502: PL/SQL: numeric or value error: raw variable length too long ORA-06512: at "SYS.UTL_ENCODE", line 243 ORA-06512: at "SYS.UTL_MAIL", line 118 ORA-06512: at "SYS.UTL_MAIL", line 324 ORA-06512: at "SYS.UTL_MAIL", line 414 ORA-06512: at line 18
I know it has something to do with blob or clob ....where i can modify my code to work.
In the database there is a job that monitors the delivered date.5 weeks before this date a email is send.I this mail i would like to implement a notification button. the receiver will get a mail with notification:o Yes i will succeedo No, i wil not succeed this answer has to be send back to the sender . how to do this. note: the receivers can have different mail clients!
I have an application written in Pl SQL Oracle which suppose to send email using utl_smtp. For users that are using Exchange Server 2010 Windows the hyperlinks inside the email are correctly but for users that have a Postfix version installed on a Debian 5 Linux mail server the hyperlinks contains some extra spaces. I think that the CRLF that I'm using inside my code to create the MIME message is not ok interpreted.
I the past when working with apex 3 I was able to work with apex mail send very nice. In apex 4.0 with oracle 11g ee I'm not able to send emails anymore.
Last error message in the queue is:
ORA-29279: SMTP permanent error: 550 through this server without authentication.
the smtp server has not been changed, the code is fine. How I can go further?
I have a refresh group that will refresh several materialized views at 4:00am. Sometimes the job failed. We need to enter to the enterprise manager to check the status of the refresh group.
Our target is that notification email is sent to our email once the refresh job failed. I have found some software that can do that. However, we need to handle ourselves. I would like to ask whether we can do that using enterprise manager.
I have Oracle 11g on Linux...and i have set up SMTP of my Enterprise Manager Database control. I click on Test and an email was sent successfully. What i don't know is how to add more emails as the recipient of the alerts.
I have setup metrics like number of sessions, cpu usage, buffer cache hits, swapping, tablespace usage, etc...Upon saving and waiting for transactions to come in, alerts were shown the the EM homepage..but i did not receive any emails.