Send a customised email from BADi
Hi,
I am working on a badi ,i need to send an email notification to a non sap id, a standard text for the subject and the text of the mail (except for some values that we have to get from the table like the document number,company code,etc) is given.
Can you please help me out with this.
Thanks in advance.Points will be rewarded.
Regards,
Reni
Hi,
In the code of the implementation for the badi definition(se19).
YOu should get the data (cody of the mail into an internal table) and pass it to the fm: SO_NEW_DOCUMENT_SEND_API1 along with the address to whom it should be sent.
Check Rich's code in this thread:
Send E-mail in htnl format
Regards,
ravi
Similar Messages
-
i cant send or receive emails from my second email account on my iphone. i have loaded i0S7. i was told that it doesnt like two emails with the same address so i changed from a hotmail to a yahoo account and still not working. can anyone tell me whats going on? thank you
Contact the email provider to troubleshoot the issue.
hotmama4278 wrote:
i was told that it doesnt like two emails with the same address
That's a load of manure. -
How can I send pictures or email from my desktop to a cell phone?
How can I send pictures or email from my desktop to a cell phone?
I use Gmail for my emails.By sharing playlists you mean sending the list of song titles along with the songs themselves you can't. That would violate Apple's contracts with the studios regarding sharing music, videos, books, etc. Which is strictly forbidden. With the single exception that I am aware of which is Home Sharing.
If you just want to share the list of song titles you could take a screen shot and email that. Hold down the home button and press and release the power button. The image is then stored in your camera roll. -
Why can't I send or get email from an AOL account!
Good Evening,
I should say if u could try to keep this simple as I am by no means a computer wiz!. Having said that I have a Verizon account & friend's of mine have AOL but for some reason we can not send email to each other as it keeps coming back.
My question is why is this? I love Verizon but have never had this with any of the other providers I had. Is there something I need to turn off? & if so what & how?. I'm really lost as to why I can't send nor get email from AOL. If anyone could explain it but in a way I can understand it this would be great!.
Thank you for your time!
Will,my70chevelless wrote:
Good Evening,
I should say if u could try to keep this simple as I am by no means a computer wiz!. Having said that I have a Verizon account & friend's of mine have AOL but for some reason we can not send email to each other as it keeps coming back.
My question is why is this? I love Verizon but have never had this with any of the other providers I had. Is there something I need to turn off? & if so what & how?. I'm really lost as to why I can't send nor get email from AOL. If anyone could explain it but in a way I can understand it this would be great!.
Thank you for your time!
Will,
What message are you getting when it comes back? Having that info would help isolate the problem.
If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
"All knowledge is worth having." -
Can't send or receive email from one account
Just bought the iPod Touch last week. Set up Hotmail account with no problems. However my MacDialup.com account (used to be dial up, but is DSL now) won't work at all. They aren't set up to use SSL, so I turned that off after the iPod automatically tried it. I tried IMAP and POP, tried changing incoming server port number from defalt 143 to 110, triple checked spelling on every single entry including password. Tried calling my ISP tech support and talked to a tech who owns an iPhone and lives in the bay area, but he couldn't figure it out. I tried deleting the MacDialup account then syncing the Touch to my iTunes on my MacBook Pro (which has no problem sending or receiving email from this same account) and had the email settings imported from the MacBook Pro - still no luck. Tomorrow I'll try bringing both my MacBook Pro and iPod Touch into the Genious Bar. Maybe they can figure it out.
iOS: Unable to send or receive email
http://support.apple.com/kb/TS3899
Can’t Send Emails on iPad – Troubleshooting Steps
http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
Setting up and troubleshooting Mail
http://www.apple.com/support/ipad/assistant/mail/
Server does not allow relaying email error, fix
http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
Why Does My iPad Say "Cannot Connect to Server"?
http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
http://support.apple.com/kb/ts2621
iPad Mail
http://www.apple.com/support/ipad/mail/
Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts Tap on the Account, then on the red button that says Remove Account.
Cheers, Tom -
How do I send a group email from Droid MAXX Gmail android app?
I have multiple groups setup in PEOPLE. How do I send a group email from my GMAIL app?
glenholmes,
You've come to the right place for help. Sorry to hear that you have had hard time with your Gmail app lately. What steps have you tried to get this to work? We want to ensure that you are able to start sending those messages right away.
ErinW_VZW
Follow us on Twitter @VZWSupport -
How do I send attachments by email from my iPad
How do I send attachments by email from my iPad
The thing to remember is that iOS email attachments start with the document itself, not from the Mail app.
1. Select the thing you want to send in an app that handles it, (for example a Photo might be sent from Photos, a PDF from GoodReader etc.)
2. Then tap the "share" button (which I see others have kindly posted screenshots for) and create an email containing that attachment.
Peter
<Link Edited By Host> -
TS3276 In sending photos by email from iPhoto my Yahoo account password is not recognised?
In sending photos by email from iPhoto on Macbook Air 10.9.1 my Yahoo account password was not recognised?
Make sure the password is correct here:
In iPhoto > Preferences > Accounts > Select your Yahoo account on the left > Password
If your Yahoo account is not there, click the + and add it -
Sending Unicode HTML email from Oracle
Dear All,
How we can send the HTML email from Oracle in Unicode format (I am using Arabic Language, to be specific). So far I have tried the following solutions (using utl_smpt) without any success (either i see junk characters in the email or see question marks). Would you please help me in solving this?
Options Tried*
Option 1
SQL> ed
Wrote file afiedt.buf
1 CREATE OR REPLACE PROCEDURE p_send_mail_test (
2 sender IN VARCHAR2,
3 recipient IN VARCHAR2,
4 subj IN VARCHAR2,
5 message IN VARCHAR2)
6 IS
7 mailhost VARCHAR2(30) := '<smtp Server>';
8 c utl_smtp.connection;
9 PROCEDURE send_header( name IN VARCHAR2, header IN VARCHAR2) AS
10 BEGIN
11 utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
12 END;
13 BEGIN
14 c := utl_smtp.open_connection(mailhost,25);
15 utl_smtp.helo(c, mailhost);
16 utl_smtp.mail(c, sender);
17 utl_smtp.rcpt(c, recipient);
18 utl_smtp.open_data(c);
19 send_header('From', sender);
20 send_header('To', recipient);
21 -- If you need to send mail to more than one receipient, uncomment the
22 -- following line(s) as appropriate. Please don't forget the ","
23 -- in the "To" line before the next receipient's email id. You can't
24 -- use a comma separated list in the receipient parameter.
25 -- For variable number of "To"'s and "Cc"'s have multiple calls to
26 -- "send_header" function inside a cursor for loop.
27 -- Similar comments apply for "Cc" too.
28 -- send_header('To', ',<email@domain>');
29 send_header('Cc', ',<email@domain>');
30 send_header('Subject', subj);
31 utl_smtp.write_data(c, utl_tcp.CRLF || message);
32 utl_smtp.close_data(c);
33 utl_smtp.quit(c);
34 EXCEPTION
35 WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
36 utl_smtp.quit(c);
37 raise_application_error(-20000,
38 'Failed to send mail due to the following error: ' || sqlerrm);
39* END;
SQL>
SQL> /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1 declare
2 email_text varchar2(2000);
3 contract_end_date_v date := sysdate;
4 name_v varchar2(200) := 'Riaz';
5 begin
6 email_text :='<br/><div align="right"><font size="4"><b>السيد '||name_v||' المحترم</b><br/><br/> يرجى التكرم بالعلم أن العقد الخاص بكم سينتهي بتاريخ ' || to_char(contract_end_date_v,'dd-mm-yyyy')||'<br/>. وعليه يرجـى التكـرم بإفادة إدارة الموارد البشرية في حال عدم رغبتكم بتجديد العقد خلال مدة أقصها أسبوعين من اليوم وذلك للأهمية القصوى <br/>.ولكم جزيل الشكر والتقدير </font></div>';
7 p_send_mail_test('<email@domain>','<email@domain>','Hello',email_text);
8* end;
SQL> /
PL/SQL procedure successfully completed.
Result_
<div align="right"><font size="4"><b>????? Riaz ???????</b>
???? ?????? ?????? ?? ????? ????? ??? ?????? ?????? 12-07-2011
.???? ???? ????? ???????? </font></div>
[Question marks along with all tags; this OTN page is converting that to HTML output]
Option2
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure html_email(
2 p_to in varchar2,
3 p_from in varchar2,
4 p_subject in varchar2,
5 p_text in varchar2 default null,
6 p_html in varchar2 default null
7 )
8 is
9 l_boundary varchar2(255) default 'a1b2c3d4e3f2g1';
10 l_connection utl_smtp.connection;
11 l_body_html clob := empty_clob; --This LOB will be the email message
12 l_offset number;
13 l_ammount number;
14 l_temp varchar2(32767) default null;
15 l_smtp_hostname varchar2(50) := '<smtp Server>';
16 begin
17 l_connection := utl_smtp.open_connection( l_smtp_hostname, 25);
18 utl_smtp.helo( l_connection, l_smtp_hostname );
19 utl_smtp.mail( l_connection, p_from );
20 utl_smtp.rcpt( l_connection, p_to );
21 l_temp := l_temp || 'MIME-Version: 1.0' || chr(13) || chr(10);
22 l_temp := l_temp || 'To: ' || p_to || chr(13) || chr(10);
23 l_temp := l_temp || 'From: ' || p_from || chr(13) || chr(10);
24 l_temp := l_temp || 'Subject: ' || p_subject || chr(13) || chr(10);
25 l_temp := l_temp || 'Reply-To: ' || p_from || chr(13) || chr(10);
26 l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
27 chr(34) || l_boundary || chr(34) || chr(13) ||
28 chr(10);
29 ----------------------------------------------------
30 -- Write the headers
31 dbms_lob.createtemporary( l_body_html, false, 10 );
32 dbms_lob.write(l_body_html,length(l_temp),1,l_temp);
33 ----------------------------------------------------
34 -- Write the text boundary
35 l_offset := dbms_lob.getlength(l_body_html) + 1;
36 l_temp := '--' || l_boundary || chr(13)||chr(10);
37 l_temp := l_temp || 'content-type: text/plain;charset=utf-8' ||
38 chr(13) || chr(10) || chr(13) || chr(10);
39 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
40 ----------------------------------------------------
41 -- Write the plain text portion of the email
42 l_offset := dbms_lob.getlength(l_body_html) + 1;
43 dbms_lob.write(l_body_html,length(p_text),l_offset,p_text);
44 ----------------------------------------------------
45 -- Write the HTML boundary
46 l_temp := chr(13)||chr(10)||chr(13)||chr(10)||'--' || l_boundary ||
47 chr(13) || chr(10);
48 l_temp := l_temp || 'content-type: text/html;charset=utf-8' ||
49 chr(13) || chr(10) || chr(13) || chr(10);
50 l_offset := dbms_lob.getlength(l_body_html) + 1;
51 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
52 ----------------------------------------------------
53 -- Write the HTML portion of the message
54 l_offset := dbms_lob.getlength(l_body_html) + 1;
55 dbms_lob.write(l_body_html,length(p_html),l_offset,p_html);
56 ----------------------------------------------------
57 -- Write the final html boundary
58 l_temp := chr(13) || chr(10) || '--' || l_boundary || '--' || chr(13);
59 l_offset := dbms_lob.getlength(l_body_html) + 1;
60 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
61 ----------------------------------------------------
62 -- Send the email in 1900 byte chunks to UTL_SMTP
63 l_offset := 1;
64 l_ammount := 1900;
65 utl_smtp.open_data(l_connection);
66 while l_offset < dbms_lob.getlength(l_body_html) loop
67 utl_smtp.write_data(l_connection,
68 dbms_lob.substr(l_body_html,l_ammount,l_offset));
69 l_offset := l_offset + l_ammount ;
70 l_ammount := least(1900,dbms_lob.getlength(l_body_html) - l_ammount);
71 end loop;
72 utl_smtp.close_data(l_connection);
73 utl_smtp.quit( l_connection );
74 dbms_lob.freetemporary(l_body_html);
75* end;
SQL> /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1 declare
2 email_text varchar2(2000);
3 contract_end_date_v date := sysdate;
4 name_v varchar2(200) := 'Riaz';
5 begin
6 email_text :='<br/><div align="right"><font size="4"><b>السيد '||name_v||' المحترم</b><br/><br/> يرجى التكرم بالعلم أن العقد الخاص بكم سينتهي بتاريخ ' || to_char(contract_end_date_v,'dd-mm-yyyy')||'<br/>. وعليه يرجـى التكـرم بإفادة إدارة الموارد البشرية في حال عدم رغبتكم بتجديد العقد خلال مدة أقصها أسبوعين من اليوم وذلك للأهمية القصوى <br/>.ولكم جزيل الشكر والتقدير </font></div>';
7 html_email(p_to=>'<email@domain>',p_from=>'<email@domain>',p_subject=>'Hello',p_text=>'Hi', p_html=>email_text);
8* end;
SQL> /
PL/SQL procedure successfully completed.
Result*
????? Riaz ???????
???? ?????? ?????? ?? ????? ????? ??? ?????? ?????? 12-07-2011
Option3
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure p_html_email_riaz(
2 p_to in varchar2,
3 p_from in varchar2,
4 p_subject in varchar2,
5 p_text in varchar2 default null,
6 p_html in varchar2 default null
7 )
8 is
9 l_boundary varchar2(255) default 'a1b2c3d4e3f2g1';
10 l_connection utl_smtp.connection;
11 l_body_html clob := empty_clob; --This LOB will be the email message
12 l_offset number;
13 l_ammount number;
14 l_temp varchar2(32767) default null;
15 l_smtp_hostname varchar2(50) := '<smtp Server>';
16 begin
17 l_connection := utl_smtp.open_connection( l_smtp_hostname, 25);
18 utl_smtp.helo( l_connection, l_smtp_hostname );
19 utl_smtp.mail( l_connection, p_from );
20 utl_smtp.rcpt( l_connection, p_to );
21 l_temp := l_temp || 'MIME-Version: 1.0' || chr(13) || chr(10);
22 l_temp := l_temp || 'To: ' || p_to || chr(13) || chr(10);
23 l_temp := l_temp || 'From: ' || p_from || chr(13) || chr(10);
24 l_temp := l_temp || 'Subject: ' || p_subject || chr(13) || chr(10);
25 l_temp := l_temp || 'Reply-To: ' || p_from || chr(13) || chr(10);
26 l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
27 chr(34) || l_boundary || chr(34) || chr(13) ||
28 chr(10);
29 ----------------------------------------------------
30 -- Write the headers
31 dbms_lob.createtemporary( l_body_html, false, 10 );
32 dbms_lob.write(l_body_html,length(l_temp),1,l_temp);
33 ----------------------------------------------------
34 -- Write the text boundary
35 l_offset := dbms_lob.getlength(l_body_html) + 1;
36 l_temp := '--' || l_boundary || chr(13)||chr(10);
37 l_temp := l_temp || 'content-type: text/plain; charset=UTF-8' ||
38 chr(13) || chr(10) || chr(13) || chr(10);
39 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
40 ----------------------------------------------------
41 -- Write the plain text portion of the email
42 /**
43 l_offset := dbms_lob.getlength(l_body_html) + 1;
44 dbms_lob.write(l_body_html,length(p_text),l_offset,p_text);
45 **/
46 ----------------------------------------------------
47 -- Write the HTML boundary
48 l_temp := chr(13)||chr(10)||chr(13)||chr(10)||'--' || l_boundary ||
49 chr(13) || chr(10);
50 l_temp := l_temp || 'content-type: text/html;' ||
51 chr(13) || chr(10) || chr(13) || chr(10);
52 l_offset := dbms_lob.getlength(l_body_html) + 1;
53 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
54 ----------------------------------------------------
55 -- Write the HTML portion of the message
56 l_offset := dbms_lob.getlength(l_body_html) + 1;
57 dbms_lob.write(l_body_html,length(p_html),l_offset,p_html);
58 ----------------------------------------------------
59 -- Write the final html boundary
60 l_temp := chr(13) || chr(10) || '--' || l_boundary || '--' || chr(13);
61 l_offset := dbms_lob.getlength(l_body_html) + 1;
62 dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
63 ----------------------------------------------------
64 -- Send the email in 1900 byte chunks to UTL_SMTP
65 l_offset := 1;
66 l_ammount := 1900;
67 utl_smtp.open_data(l_connection);
68 while l_offset < dbms_lob.getlength(l_body_html) loop
69 utl_smtp.write_raw_data(l_connection,
70 utl_raw.cast_to_raw(
71 dbms_lob.substr(l_body_html,l_ammount,l_offset ) ) );
72 l_offset := l_offset + l_ammount ;
73 l_ammount := least(1900,dbms_lob.getlength(l_body_html) - l_ammount);
74 end loop;
75 utl_smtp.close_data(l_connection);
76 utl_smtp.quit( l_connection );
77 dbms_lob.freetemporary(l_body_html);
78* end;
SQL>
SQL> /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1 declare
2 email_text varchar2(2000);
3 contract_end_date_v date := sysdate;
4 name_v varchar2(200) := 'Riaz';
5 begin
6 email_text :='<br/><div align="right"><font size="4"><b>السيد '||name_v||' المحترم</b><br/><br/> يرجى التكرم بالعلم أن العقد الخاص بكم سينتهي بتاريخ ' || to_char(contract_end_date_v,'dd-mm-yyyy')||'<br/>. وعليه يرجـى التكـرم بإفادة إدارة الموارد البشرية في حال عدم رغبتكم بتجديد العقد خلال مدة أقصها أسبوعين من اليوم وذلك للأهمية القصوى <br/>.ولكم جزيل الشكر والتقدير </font></div>';
7 p_html_email_riaz(p_to=>'<email@domain>',p_from=>'<email@domain>',p_subject=>'Hello',p_text=>'Hi', p_html=>email_text);
8* end;
SQL> /
PL/SQL procedure successfully completed.
Result*
GaSmO Riaz GacMJQc
mQLl GaJ_Qc HGaZac Cd GaZ^O GaNGU H_c SmdJem HJGQmN 12-07-2011
. fZame mQL\l GaJ_\Qc HE]GOI EOGQI GacfGQO GaHTQmI ]m MGa ZOc Q[HJ_c HJLOmO GaZ^O NaGa cOI C^UeG CSHfZmd cd Gamfc fPa_ aaCecmI Ga^Ufl
.fa_c LRma GaT_Q fGaJ^OmQ
*Option4*
[code]
SQL> ed
Wrote file afiedt.buf
1 CREATE OR REPLACE PROCEDURE send_email_html_test(
2 pi_from IN Varchar,
3 pi_to IN VARCHAR,
4 pi_cc IN Varchar,
5 pi_subj IN VARCHAR,
6 pi_msg CLOB
7 )
8 IS
9 conn utl_smtp.connection;
10 lv_mailhost varchar2(1000);
11 lv_port number;
12 BEGIN
13 lv_mailhost := '<smtp Server>';
14 lv_port := 25;
15 conn := utl_smtp.open_connection(lv_mailhost, lv_port);
16 utl_smtp.helo(conn, lv_mailhost);
17 utl_smtp.mail(conn, pi_from);
18 utl_smtp.rcpt(conn, pi_to);
19 IF pi_cc is not null THEN
20 utl_smtp.rcpt(conn, pi_cc);
21 END IF;
22 utl_smtp.open_data(conn);
23 utl_smtp.write_data(conn, 'MIME-version: 1.0' || utl_tcp.CRLF);
24 utl_smtp.write_data(conn, 'Content-Type: text/html; charset=iso-8859-6' ||
25 utl_tcp.CRLF);
26 utl_smtp.write_data(conn, 'Content-Transfer-Encoding: 8bit' ||
27 utl_tcp.CRLF);
28 utl_smtp.write_data(conn, 'From:' ||pi_from || utl_tcp.CRLF);
29 utl_smtp.write_data(conn, 'To:' ||pi_to || utl_tcp.CRLF);
30 utl_smtp.write_data(conn, 'Cc:' ||pi_cc || utl_tcp.CRLF);
31 utl_smtp.write_data(conn, 'Reply-To:' ||pi_from || utl_tcp.CRLF);
32 utl_smtp.write_data(conn, 'Subject:' ||pi_subj|| utl_tcp.CRLF);
33 utl_smtp.write_data(conn, utl_tcp.crlf);
34 utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(pi_msg));
35 utl_smtp.close_data(conn);
36 utl_smtp.quit(conn);
37 EXCEPTION WHEN others THEN
38 dbms_output.put_line(sqlerrm);
39* END;
40 /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1 declare
2 email_text varchar2(2000);
3 contract_end_date_v date := sysdate;
4 name_v varchar2(200) := 'Riaz';
5 begin
6 email_text :='
<div align="right"><font size="4"><b>السيد '||name_v||' المحترم</b>
يرجى التكرم بالعلم أن العقد الخاص بكم سينتهي بتاريخ ' || to_char(contract_end_date_v,'dd-mm-yyyy')||'
. وعليه يرجـى التكـرم بإفادة إدارة الموارد البشرية في حال عدم رغبتكم بتجديد العقد خلال مدة أقصها أسبوعين من اليوم وذلك للأهمية القصوى
.ولكم جزيل الشكر والتقدير </font></div>';
7 send_email_html_test('<email@domain>',
8 '<email@domain>',
9 '<email@domain>',
10 'Hello',email_text);
11* end;
SQL> /
PL/SQL procedure successfully completed.
Result*
Riaz افكحترك
ٍرجٌ افترك بافغفك أل افغد افخاص بك سٍلتمٍ بتارٍخ 12-07-2011
. نغفٍم ٍرجٌ افترك بإادة إدارة افكنارد افبشرٍة ٍ حاف غدك ربتك بتجدٍد افغد خفاف كدة أصما أسبنغٍل كل افٍنك نذف ففأمكٍة افصنٌ
.نفك جزٍف افشر نافتدٍر
Option5
SQL> ed
Wrote file afiedt.buf
1 CREATE OR REPLACE PROCEDURE send_mail_test1 (p_to IN VARCHAR2,
2 p_from IN VARCHAR2,
3 p_subject IN VARCHAR2,
4 p_text_msg IN VARCHAR2 DEFAULT NULL,
5 p_html_msg IN VARCHAR2 DEFAULT NULL,
6 p_smtp_host IN VARCHAR2,
7 p_smtp_port IN NUMBER DEFAULT 25)
8 AS
9 l_mail_conn UTL_SMTP.connection;
10 l_boundary VARCHAR2(50) := '----=*#abc1234321cba#*=';
11 BEGIN
12 l_mail_conn := UTL_SMTP.open_connection(p_smtp_host, p_smtp_port);
13 UTL_SMTP.helo(l_mail_conn, p_smtp_host);
14 UTL_SMTP.mail(l_mail_conn, p_from);
15 UTL_SMTP.rcpt(l_mail_conn, p_to);
16 UTL_SMTP.open_data(l_mail_conn);
17 UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || UTL_TCP.crlf);
18 UTL_SMTP.write_data(l_mail_conn, 'To: ' || p_to || UTL_TCP.crlf);
19 UTL_SMTP.write_data(l_mail_conn, 'From: ' || p_from || UTL_TCP.crlf);
20 UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || p_subject || UTL_TCP.crlf);
21 UTL_SMTP.write_data(l_mail_conn, 'Reply-To: ' || p_from || UTL_TCP.crlf);
22 UTL_SMTP.write_data(l_mail_conn, 'MIME-Version: 1.0' || UTL_TCP.crlf);
23 UTL_SMTP.write_data(l_mail_conn, 'Content-Type: multipart/alternative; boundary="' || l_boundary || '"' || UTL_TCP.crlf || UTL_TCP.crlf);
24 IF p_text_msg IS NOT NULL THEN
25 UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
26 UTL_SMTP.write_data(l_mail_conn, 'Content-Type: text/plain; charset="utf-8"' || UTL_TCP.crlf || UTL_TCP.crlf);
27 UTL_SMTP.write_data(l_mail_conn, p_text_msg);
28 UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);
29 END IF;
30 IF p_html_msg IS NOT NULL THEN
31 UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
32 UTL_SMTP.write_data(l_mail_conn, 'Content-Type: text/html; charset="utf-8"' || UTL_TCP.crlf || UTL_TCP.crlf);
33 UTL_SMTP.write_data(l_mail_conn, p_html_msg);
34 UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);
35 END IF;
36 UTL_SMTP.write_data(l_mail_conn, '--' || l_boundary || '--' || UTL_TCP.crlf);
37 UTL_SMTP.close_data(l_mail_conn);
38 UTL_SMTP.quit(l_mail_conn);
39* END;
SQL> /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1 declare
2 email_text varchar2(2000);
3 contract_end_date_v date := sysdate;
4 name_v varchar2(200) := 'Riaz';
5 begin
6 email_text :='<br/><div align="right"><font size="4"><b>السيد '||name_v||' المحترم</b><br/><br/> يرجى التكرم بالعلم أن العقد الخاص بكم سينتهي بتاريخ ' || to_char(contract_end_date_v,'dd-mm-yyyy')||'<br/>. وعليه يرجـى التكـرم بإفادة إدارة الموارد البشرية في حال عدم رغبتكم بتجديد العقد خلال مدة أقصها أسبوعين من اليوم وذلك للأهمية القصوى <br/>.ولكم جزيل الشكر والتقدير </font></div>';
7 send_mail_test1('<email@domain>',
8 '<email@domain>',
9 'Hello',
10 'msg',
11 email_text,
12 '<smtp Server>',
13 25);
14* end;
SQL> /
PL/SQL procedure successfully completed.
Result*
????? Riaz ???????
???? ?????? ?????? ?? ????? ????? ??? ?????? ?????? 12-07-2011
.???? ???? ????? ????????I worked with Oracle support and was able to find solution. The helping document ids were: 752309.1 & 404389.1
-
Unable to send web content emails from mail as web page since upgrading to the new OS X 10.9
I am no longer able to send web content emails from mail as web page. The images / layout no longer transmit. This started when I upgraded to the new OS X 10.9. The emails appear correctly in the orginal message prior to sending but once they are sent all the images and layout are removed. The sent message folder shows the emails in the changed versions vs what the draft showed prior to sending. If the webpage is only an image my final sent message will only show an empty box with an question mark.
Hold down the option key and select
▹ System Information...
from the menu bar. In the window that opens, select
Hardware ▹ USB
from the list on the left. On the right you should now see a list of all connected USB devices, as well as some built-in components. Is the device shown? -
Can I send a delayed email from an iPad? if so, how?
How can I send a delayed email from my iPad?
The only way would be to draft the E-mail and then close the iPad. A draft would be created that would, I think, be sent the next time you turn the iPad on.
There is no "time delay" function.
Barry -
How can a send a group email from ipad
How can I send a group email from iPad
You need a third party app. You can't create contacts groups in the built in mail app. Look at...
http://solubleapps.com/mailshot/
or
http://www.redbits.com/iphone/groupemail/ -
I can't send or receive emails from my Mac...please help
I can't send or receive emails from my Mac...please help
OS X Mail: Troubleshooting sending and receiving email messages
-
How do i send a html email from office outlook web access?
how do i send a html email from office outlook web access?
glenholmes,
You've come to the right place for help. Sorry to hear that you have had hard time with your Gmail app lately. What steps have you tried to get this to work? We want to ensure that you are able to start sending those messages right away.
ErinW_VZW
Follow us on Twitter @VZWSupport -
How to send set of emails from SSIS
Hi All,
I would like to send set of emails from SSIS.
For eg: I have to,from,Subject and mail body present in a table. I would like to go through the table 1 row at a time and send mails
Regards,
P M-SHi Vishal,
Thanks for the response.
Example doesn't say how to dynamically control To and From lines. What I am looking for is to send mails from an existing table which has To,From,Subject and Body. Basically 1 email per row from an existing table
regards,
P M-S
You can do this in T - SQL itself using sp_send_dbmail
the code will look like below
IF OBJECT_ID('tempdb..#temp') IS NOT NULL
DROP TABLE #temp
SELECT *,
ROW_NUMBER() OVER (ORDER BY PK) AS ID
INTO #temp
FROM Yourtable
DECLARE @ID int,@To varchar(5000),@From varchar(5000),@Subject varchar(max)
SELECT TOP 1 @ID = ID,
@To = To,
@From = From,
@Subject = Subject
FROM #temp
ORDER BY ID
WHILE @ID IS NOT NULL
BEGIN
EXEC sp_send_dbmail @recipients = @To,
@from_address = @From,
@subject = @Subject
SELECT TOP 1 @ID = ID,
@To = To,
@From = From,
@Subject = Subject
FROM #temp
WHERE ID > @ID
ORDER BY ID
END
Assuming you've default private mail profile set or there's a public profile defined for msdb
otherwise you need to pass a valid mail profile
IF in SSIS you can do this
https://support.microsoft.com/kb/906547?wa=wsignin1.0
http://www.devtechie.com/post/2013/01/04/Send-Mail-Task-%E2%80%93-Dynamic-Recipient.aspx
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Maybe you are looking for
-
Need some help in creation of a VM image
Hi, we have been tasked with the creation of a VM image which has WebLogic Server, Coherence, Oracle Database XE etc. And I am a newbie to it Do you have any tips to help me get started?? Thanks and regards Anil
-
How do I get rid of the calendars in the source list?
I don't want Iphoto automatically organizing my photos by year, and I don't want to see the last four years depicted as calendar icons in the source list, and I don't want an item called "early photos' in my source list. How do I get rid of these unw
-
Why T-RFC Port canu2019t handle Partner Profile Segment Release Version.
Can TRFC Port handle the segment release of each of the segment if configured in Partner Profile. As per sap, in Partner Profile, if we maintain the two field "Seg. Release in IDoc Type" and "Segment Application release" to a SAP Release lower than
-
How can I delete a tv show from the icloud?
I don't mean hide them, I want to completely remove them. I saw that you need icloud.com and I was wondering if there was another way because my iPod is too old to be connected to icloud.com so I can't use that
-
Upgrade from Adobe Reader LE 2.0 2006
I have an AT&T Tilt smart phone made by HTC that has the above Adobe reader on it V2.00.288531. I have noticed that it will not read PDF files made on newer versions of a Xerox Copier. It does open the ones made on older Xerox machines. However those