Sending Mails to Multiple Recipients using UTL_SMTP
create or replace procedure send_mail(msg_text varchar2) is
c utl_smtp.connection;
PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
END;
BEGIN
c := utl_smtp.open_connection('outlook.abc.com');
utl_smtp.helo(c, 'abc.com');
utl_smtp.mail(c, '[email protected]');
utl_smtp.rcpt(c, '[email protected]');
utl_smtp.open_data(c);
send_header('From', '"root" <[email protected]>');
send_header('To', '"abc" <[email protected]>');
send_header('Subject', 'WARNING: Salary has been changed');
utl_smtp.write_data(c, utl_tcp.CRLF || msg_text);
utl_smtp.close_data(c);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
BEGIN
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
NULL; -- When the SMTP server is down or unavailable, we don't have
-- a connection to the server. The quit call will raise an
-- exception that we can ignore.
END;
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;
==============
when I execute the above using
sql> exec send_mail('hihihih');
I am getting the mails..no problems...
So..I created the following trigger and used the above procedure to send the mail...
CREATE OR REPLACE TRIGGER test_emp_table_trg
AFTER UPDATE
ON test_emp_table
FOR EACH ROW
WHEN (NEW.sal <> OLD.sal)
DECLARE
l_employee_name VARCHAR2 (240);
l_old_sal VARCHAR2 (240);
l_new_sal VARCHAR2 (240);
l_message VARCHAR2 (240);
BEGIN
/* Gets the employee full name */
BEGIN
SELECT ename
INTO l_employee_name
FROM test_emp_table
WHERE empno = :OLD.empno;
EXCEPTION
WHEN OTHERS
THEN
l_employee_name := NULL;
END;
/* Gets the old Salary */
BEGIN
SELECT sal
INTO l_old_sal
FROM test_emp_table
WHERE empno = :OLD.empno;
EXCEPTION
WHEN OTHERS
THEN
l_old_sal := 0;
END;
/* Gets the new salary */
BEGIN
SELECT sal
INTO l_new_sal
FROM test_emp_table
WHERE empno= :NEW.empno;
EXCEPTION
WHEN OTHERS
THEN
l_new_sal := 0;
END;
l_message:=
'Employee Name= '
|| l_employee_name
|| 'Old Salary= '
|| l_old_sal
|| 'New Salary= '
|| l_new_sal;
BEGIN
send_mail (l_message);
END;
END;
===================
I am not getting desired output..what might be problem friends...I am getting 0 values for old salary and new salary......
One more thing..when i use 2 receipts in the send_mail procedure like this...I added the following lines in the procedure to send to multiple receipents..
======
utl_smtp.rcpt(c, '[email protected]');
utl_smtp.rcpt(c, '[email protected]');
=============
Pleas have a look and correct me, where i went wrong....
Edited by: oraDBA2 on Sep 22, 2008 3:12 PM
Hi, You can use the following routine to send mail to multiple recipients through utl_smtp.
create or replace package mail_pkg
as
type array is table of varchar2(255);
procedure send( p_sender_e_mail in varchar2,
p_from in varchar2,
p_to in array default array(),
p_cc in array default array(),
p_bcc in array default array(),
p_subject in varchar2,
p_body in long );
end;
create or replace package body mail_pkg
begin
g_crlf char(2) default chr(13)||chr(10);
g_mail_conn utl_smtp.connection;
g_mailhost varchar2(255) := 'ur mail server';
function address_email( p_string in varchar2,
p_recipients in array ) return varchar2
is
l_recipients long;
begin
for i in 1 .. p_recipients.count
loop
utl_smtp.rcpt(g_mail_conn, p_recipients(i));
if ( l_recipients is null )
then
l_recipients := p_string || p_recipients(i) ;
else
l_recipients := l_recipients || ', ' || p_recipients(i);
end if;
end loop;
return l_recipients;
end;
procedure send( p_sender_e_mail in varchar2,
p_from in varchar2,
p_to in array default array(),
p_cc in array default array(),
p_bcc in array default array(),
p_subject in varchar2,
p_body in long );
end;
is
l_to_list long;
l_cc_list long;
l_bcc_list long;
l_date varchar2(255) default
to_char( SYSDATE, 'dd Mon yy hh24:mi:ss' );
procedure writeData( p_text in varchar2 )
as
begin
if ( p_text is not null )
then
utl_smtp.write_data( g_mail_conn, p_text || g_crlf );
end if;
end;
begin
g_mail_conn := utl_smtp.open_connection(g_mailhost, 25);
utl_smtp.helo(g_mail_conn, g_mailhost);
utl_smtp.mail(g_mail_conn, p_sender_e_mail);
l_to_list := address_email( 'To: ', p_to );
l_cc_list := address_email( 'Cc: ', p_cc );
l_bcc_list := address_email( 'Bcc: ', p_bcc );
utl_smtp.open_data(g_mail_conn );
writeData( 'Date: ' || l_date );
writeData( 'From: ' || nvl( p_from, p_sender_e_mail ) );
writeData( 'Subject: ' || nvl( p_subject, '(no subject)' ) );
writeData( l_to_list );
writeData( l_cc_list );
utl_smtp.write_data( g_mail_conn, '' || g_crlf );
utl_smtp.write_data(g_mail_conn, p_body );
utl_smtp.close_data(g_mail_conn );
utl_smtp.quit(g_mail_conn);
end;
end;
begin
mail_pkg.send
(p_sender_e_mail => 'urmail',
p_from => 'urmail',
p_to => mail_pkg.array( 'urmail','othersmail' ),
p_cc => mail_pkg.array( ' othermail ' ),
p_bcc => mail_pkg.array( '' ),
p_subject => 'This is a subject',
p_body => 'Hello Buddy, this is the mail you need' );
end;
/
Similar Messages
-
How to send mails to multiple recipents using SO_DOCUMENT_SEND_API
Hi ,
I am using the FM "SO_DOCUMENT_SEND_API".
I am able to send an Excel sheet as attachement, but my requirement is to send multiple mails to the corresponding persons. I tried using coma, colan, semi colan as the separator in the import parameter SENDER_ADDRESS for two different mail id's but it was not useful.
I need to send mails to multiple recipens using the same FM. (keeping one person in to list and two of the persons in CC.)
can any on throw some light on this.
Thanks
rewards will be great.....................................Hi,
The code below demonstrates how to send an email to an external email address([email protected]),
where the data is stored within a .xls attachment.
Instead of the statement, <b>PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.</b>,
use select-options & give the e-mail addresses that you want.
*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'XLS'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
Hope this helps.
Reward if helpful.
Regards,
Sipra -
How do I send mail to multiple recipients?
I am running Mavericks 10.9.5. I am having trouble sending mail to multiple recipients. I type in the first person’s name and the e-mail address appears. When I want to send mail to 2 more people, I can’t. I type a comma and then a space and then the second person’s name. All that appears is a duplication of the first person’s name. I did not have this kind of trouble when I was running OS X, version 10.6.8. I could type the names of all recipients in the “To”
line. What can I do?See the response to your other post
-
Sending email to multiple address using Utl_Smtp
Hi,
I want to send email to multiple address using the Utl_Smtp feature.
When I am sending email to one email address in the To:Field it works fine.However, when I send
to multiple address I am getting the below error.I am using a table(Email_test) to store all email id.
Error report:
ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at line 48
29279. 00000 - "SMTP permanent error: %s"
*Cause: A SMTP permanent error occurred.
*Action: Correct the error and retry the SMTP operation.
I am trying two options both ways I am getting error
Option 1:
Selecting two email id indivually in the select query as below
select email into v_Recipient1 from Email_test where Key_name='U1';
select email into v_Recipient2 from Email_test where Key_name='U2';
v_Recipient := v_Recipient1||';'||v_Recipient2;
Option 2:
Is there a way to use option
select email into v_Recipient1 from Email_test where Key_name='U4';
===========================================================
Create table Script
===========================================================
create table Email_test (Email varchar2(100),Key_name varchar2(10));
insert into Email_test values ('[email protected]','U1');
insert into Email_test values ('[email protected]','U2');
insert into Email_test values ('[email protected]','U3')
insert into Email_test values ('[email protected];[email protected];[email protected]','U4');
select * from Email_test
[email protected] U1
[email protected] U2
[email protected] U3
[email protected];[email protected];[email protected] U4
select * from Email_test where Key_name in ('U1','U2','U3')
[email protected] U1
[email protected] U2
[email protected] U3
select * from Email_test where Key_name='U4'
[email protected];[email protected];[email protected]
=======================================================
PL/SQL Block
===========================================================
declare
v_From VARCHAR2(80) := '[email protected]';
v_cc VARCHAR2(80);
v_Recipient VARCHAR2(80) ;
v_Recipient1 VARCHAR2(80) ;
v_Recipient2 VARCHAR2(80) ;
v_Subject VARCHAR2(80);
v_Mail_Host VARCHAR2(50);
v_Mail_Conn utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
begin
--Mail Host name
select VALUE into v_Mail_Host from Server_info where server_name = 'SMTPServer';
select email into v_Recipient1 from Email_test where Key_name='U1';
select email into v_Recipient2 from Email_test where Key_name='U2';
v_Recipient := v_Recipient1||';'||v_Recipient2;
--for CC
select email into v_cc from Email_test where Key_name='U3';
v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
utl_smtp.Mail(v_Mail_Conn, v_From);
utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
utl_smtp.Rcpt(v_Mail_Conn, v_cc); -- To CC recepient
utl_smtp.Rcpt(v_Mail_Conn, v_BCC); To BCC recepient
utl_smtp.Data(v_Mail_Conn,
'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
'From: ' || v_From || crlf ||
'Subject: '|| v_Subject || crlf ||
'To: ' || v_Recipient || crlf ||
'Cc: ' || v_cc || crlf ||
'Content-Type: text/html;' ||crlf ||
--'Hello this is a test email');
crlf || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf );
utl_smtp.Quit(v_mail_conn);
end;
Any suggestion how to approach this issue.
Thank youSimple Mail Transfer Protocol RFC 5321 specifications.
RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>
The first or only argument to this command includes a forward-path
(normally a mailbox and domain, always surrounded by ">" and "<"
brackets) identifying one recipient.In other words, you can only define a SINGLE mailbox address at a time. Multiple addresses requires multiple repeats of this command verb, once per maibox.
Do not confuse this and the To: tag line in the Mime header that contains a comma delimited list of recipients. That tag line can contain anything - it is not parsed, not checked, and not verified as matching the actual recipient mailboxes as specified via the RCPT TO verb. -
Sending mails to multiple recipients
Hi,
I need to send an e-mail to multiple recipients, none of which may know that the mail was sent to others as well. Of course, the first idea was to use the BCC-field. However, if I do that, the receipients get a mail with an empty To-Field, which looks both stupid and suspicious. Is there a way to send a mail in such a way that each recpient has their own address in the To-Field? I also played around a bit with Automator but I couldn't find anything.Hi Phunkjoker!
I don't think you can, except by sending each individually.
The only alternative that I can figure out is to send it to yourself, and have the other recipients in the BCC field? -
Retrieve multiple e-mail address and send mail to multiple recipients
Hello,
I wonder if somebody could help me...at least with the clue to do the following.
I have a form, with a textarea , where the people should put the e-mail addreses of all the people that later will receive all the form data via e-mail..
I do not know how to retrieve all this e-mail addresses from the textarea (format?) and then how to send the e-mail to multiple recipients .
It works for one...but I do not know how to do this for several recipients...
could you please help?There is a setReceiptants method on the Message object.
http://java.sun.com/products/javamail/javadocs/javax/mail/Message.html#setRecipients(javax.mail.Message.RecipientType,%20javax.mail.Address[])
You will need to create an array of Addresses to feed it (just make space, commas, and semi-colons be tokens in your string and iterate it to create the address array)
travis (at) overwrittenstack.com -
Problem in sending mails to multiple recipients
Hellow ABAP gurus,
i am stuck in a problem, where cannot send the mail to multiple reciepients.
actually i am adding recipients one after another, the email address is popualted already.just tell me if i am doing anything wrong..its not giving me any error. but its not taking any users in cc:
i am new to Abap oops..so please help me n this.
the code i am using is
CALL METHOD w_document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = w_att_name
i_att_content_hex = pdf_content.
*add document to send request
send_request->set_document( w_document ).
if w_covsmtp is not initial.
*--add recipient (e-mail address
w_recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_covsmtp ). " w_addr-e_mail ).
endif.
*-- add recipient cc1 (e-mail address)
if w_cc_mail1 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail1 ). " w_addr-e_mail ).
endif.
*--add recipient cc2(e-mail address)
if w_cc_mail2 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail2 ). " w_addr-e_mail ).
endif.
*-- add recipient cc3(e-mail address)
if w_cc_mail3 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail3 ). " w_addr-e_mail ).
endif.
if w_recipient is not initial.
*--add recipient to send request
send_request->add_recipient( i_recipient = w_recipient ).
endif.
*--add recipient cc1 to send request
if w_recipient_cc1 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc1 ).
endif.
*--add recipient cc2 to send request
if w_recipient_cc2 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc2 ).
endif.
*--add recipient cc3 to send request
if w_recipient_cc3 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc3 ).
endif.
send document -
sent_to_all = send_request->send(
i_with_error_screen = c_x ).
IF sent_to_all = c_charx.
IF gv_screen_display = c_charx.
MESSAGE i022(so).
ENDIF.
w_sent = c_charx.
ENDIF.
Thanks in advance,
RohanWell, it's been a while since I have used these classes to send some email, but what about changing the order of the calls for creating internet address and adding recipient like this:
*-- add recipient cc1 (e-mail address)
if w_cc_mail1 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail1 ). " w_addr-e_mail ).
endif.
if w_recipient is not initial.
*--add recipient to send request
send_request->add_recipient( i_recipient = w_recipient ).
endif. -
Sending mail with multiple recipients as one mail?
The project I'm working on to migrate users to the new 7.x messaging platform keeps asking me to do some special configurations.
I got this question today...
xxxxxxxxxxxxxxxxxxxxxxxxx
4. As inquired, when sent from SunMail to/copying multiple addresses, the outgoing email is replicated as many as the number of addressees
(For example, if you are sending an email to 10 people, the email is sent as 10 emails)
In the Exchange system, email to multiple recipients is replicated in the Top Mail Server. But in SunMail, such email is replicated to 10 emails when being sent.
We want SunMail emails to remain as a single email when being sent and only to be replicated to each recipient in the Top Mail Server.
This may be dependent on the specs of mail software, which means it may not be able to fix, but please confirm.
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
The "top mail server" is just some postoffice product, appliance type mta for sendmail.
Is there anyways to pass along the email without expanding the recipients into individual mails?
Thanks.
-RayRay_Cormier wrote:
Hey Kelly, longtime no chat. Thanks for such a detailed and informative answer. I read over the link, that explains a lot. The old system is a 6.3. Unfortunately I have a very limited access to the old production systems and can't do much. Otherwise information is like pulling teeth around here. I've copied over all the configuration files and I am going through that stuff now.I recommend you compare the old MS6.3 configuration with the new MS7u3 default (configuration) settings and make changes to the MS7u3 settings only where necessary. Using the old MS6.3 settings may no longer be appropriate for the new environment.
I think the main thing here, is that the default behavior in the proposed 7.x system will give them the results they seek, does that sounds like a fair assumption?Taking a step back I question the initial statement:
"4. As inquired, when sent from SunMail to/copying multiple addresses, the outgoing email is replicated as many as the number of addressees".
From a strictly performance/storage perspective it makes no sense to "replicate" an email and the MTA goes to great lengths to avoid such replication where possible. Kelly has pointed out one scenario where replication will occur ("single" channel keyword) but this is not enabled by default (for good reason). There could be other causes e.g. conversion channel or sieve filters or spam filtering that operates at the envelope recipient level.
So if this "replication" behaviour is occurring in the old environment then without understanding why it is occurring you cannot assume it won't occur in the new environment -- especially if you are copying across the old config files.
Regards,
Shane. -
Sending mail to multiple recipients
Hello friends,
i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kindly reply. i have included sendmail->code and setproperty-> and the exact exception.
SENDMAIL
public boolean sendMail(User userObj, Message message, String content){
try{
util util=new util();
String arr[]=util.getTokens(userObj.email,",");
InternetAddress inetarr[]=new InternetAddress[arr.length];
for(int i=0;i<arr.length;i++){
inetarr=new InternetAddress(arr[i].toString());
message.setRecipients(Message.RecipientType.TO, inetarr);
MimeMultipart multipart=new MimeMultipart();
BodyPart msgBodyPart=new MimeBodyPart();
msgBodyPart.setContent(content, "text/html");
multipart.addBodyPart(msgBodyPart);
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
return true;
}catch(Exception e){
e.printStackTrace();
return false;
}//End Of The Method
GETPROPRITIES
protected Properties getProperties(){
Properties props = new Properties();
props.put("mail.smtp.starttls.enable","true");
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", adminObj.info.server[0]);
props.put("mail.smtp.port",adminObj.info.server_port[0]+"");
props.put("mail.debug","false");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.quitwait", "false");
props.put("mail.smtp.sendpartial", "true");
return props;
}//End Of The Method
Exception
javax.mail.internet.AddressException: Illegal route-addr in string ``saravana.07
@gmail.com,[email protected]''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java
:883)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:819)
at javax.mail.internet.InternetAddress.parseHeader(InternetAddress.java:
580)
at javax.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:680
at javax.mail.internet.MimeMessage.getFrom(MimeMessage.java:340)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:897)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at common.application.utilities.TenderMail.sendMail(TenderMail.java:483)
at common.application.mail.send_user_mail.__BodhiReceive(send_user_mail.
java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at jdbs.BodhiServer.callStation(Unknown Source)
at jdbs.BodhiSend.doSend(Unknown Source)
at common.application.mail.sendmail.__BodhiReceive(sendmail.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at JumpForwarder1.callStation(JumpForwarder1.java:863)
at JumpForwarder1.processRequest(JumpForwarder1.java:613)
at JumpForwarder1.authenticateUserAndExecute(JumpForwarder1.java:254)
at JumpForwarder1.doPost(JumpForwarder1.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)You seem to be splitting a string containing multiple addresses and constructing
InternetAddress objects for each entry. But looking at the address it's complaining
about, it looks like you failed to split the string properly. You might want to use the
InternetAddress.parse method that will do the splitting for you. -
Unable to send mail to multiple recipients with attachment
I'm using a script given in the Oracle page - http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt for sending mail with attachment. Although I'm able to send mail with attachment to a single user, but the same can't be done while the recipients are more than one. Can some one help me ?
Hi,
Ca you please send me an example set of parameteres that we need to pass to make this program work?
I'm not able to attach a file to this program.Can youe please let me know how I can attach a file called 'Test.txt' kept at 'D:\' to this program?
Thanks.
Bhavin -
Send mail to multiple user using plsql
Hi
I wrote plsql block as below
===========
mail_conn := UTL_SMTP.open_connection (mailhost, 25);
UTL_SMTP.helo (mail_conn, mailhost);
UTL_SMTP.mail (mail_conn, p_sender);
UTL_SMTP.rcpt (mail_conn, p_recipient);
UTL_SMTP.rcpt (mail_conn, p_cc);
UTL_SMTP.rcpt (mail_conn, p_bcc);
UTL_SMTP.DATA (mail_conn,
'From: '
|| p_sender
|| UTL_TCP.crlf
|| 'To: '
|| p_recipient
|| UTL_TCP.crlf
|| 'Cc: '
|| p_cc
|| UTL_TCP.crlf
|| 'Cc: '
|| p_bcc
|| UTL_TCP.crlf
|| 'Subject: '
|| p_subject
|| UTL_TCP.crlf
|| p_message
UTL_SMTP.quit (mail_conn);
==========
when I pass single-single user id in To,From,CC,Bcc mail goes through. But when I have multiple emaild mail doesn't go through.
How do I fix this?
second problem is when I don't provide Bcc or provide Bcc value null even single email ids mail doesn't go.
I can have some id as bcc for workaround but first issue is blocking me.
Any help appreciated.
Thanks
AjayCREATE OR REPLACE TRIGGER EmailOnServerErr AFTER SERVERERROR ON DATABASE
DECLARE
mail_conn UTL_SMTP.connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
msg VARCHAR2(32760);
sid_name VARCHAR2(16);
bdump_dest VARCHAR2(128);
smtp_relay VARCHAR2(32) := 'MyMailRelay';
recipient_address VARCHAR2(64) := '[email protected]';
sender_address VARCHAR2(64) := '[email protected]';
mail_port NUMBER := 25;
log_file_handle UTL_FILE.FILE_TYPE;
log_file_dir VARCHAR2(256) := 'ERR_LOG_DIR';
log_file_name VARCHAR2(256) := 'OracleErrors.log';
maxlinesize NUMBER := 32767;
session_rec sys.v_$session%ROWTYPE;
audit_rec sys.dba_audit_trail%ROWTYPE;
auditing BOOLEAN;
LinesOfSQL BINARY_INTEGER;
offending_sql DBMS_STANDARD.ora_name_list_t;
CURSOR bdump_cur IS
SELECT TRIM(value)
FROM v$parameter
WHERE name = 'background_dump_dest'
CURSOR sid_cur IS
SELECT TRIM(instance_name)
FROM v$instance
CURSOR session_cur IS
SELECT s.*
FROM v$session s
WHERE s.sid = dbms_support.mysid
CURSOR audit_trail_cur(AUDSID IN NUMBER) IS
SELECT *
FROM dba_audit_trail
WHERE sessionid = AUDSID
BEGIN
IF (USER = 'SYSTEM' OR USER = 'SYS') THEN
-- Ignore this error
NULL;
ELSIF IS_SERVERERROR (1034) THEN
-- Ignore this error
NULL;
ELSE
-- get the sid
OPEN sid_cur;
FETCH sid_cur INTO sid_name;
CLOSE sid_cur;
-- get the location of the alert log
OPEN bdump_cur;
FETCH bdump_cur INTO bdump_dest;
CLOSE bdump_cur;
-- get the session information
OPEN session_cur;
FETCH session_cur INTO session_rec;
CLOSE session_cur;
-- get the audit_trail information if it exists
OPEN audit_trail_cur(session_rec.audsid);
FETCH audit_trail_cur INTO audit_rec;
auditing := audit_trail_cur%FOUND;
CLOSE audit_trail_cur;
IF session_rec.program = 'MyProgram.exe' THEN
NULL; -- ignore actions from MyProgram - that's where I do maintenance
ELSE
-- compose the message
msg := 'Subject: Oracle error '||' on '||sid_name||crlf;
msg := msg||'To: '||recipient_address||crlf;
msg := msg||'For more information see the alert log file located at:'||crlf;
msg := msg||bdump_dest||'/alert_'||sid_name||'.log'||crlf;
msg := msg||'or the error log file: $'||log_file_dir||'/'||log_file_name||crlf;
msg := msg||'Error Time='||TO_CHAR(SYSDATE,'DD-Mon-YYYY HH24:MI:SS')||crlf;
msg := msg||DBMS_UTILITY.FORMAT_CALL_STACK||crlf;
LinesOfSQL := sql_txt(offending_sql);
msg := msg||'Offending SQL is:'||crlf;
FOR loop_counter IN offending_sql.FIRST..offending_sql.LAST
LOOP
msg := msg||offending_sql(loop_counter);
END LOOP;
msg := msg||crlf||'----- PL/SQL Error Stack -----'||crlf;
msg := msg||DBMS_UTILITY.FORMAT_ERROR_STACK||crlf;
msg := msg||'V$SESSION.SADDR=' ||session_rec.saddr ||crlf;
msg := msg||'V$SESSION.SID=' ||session_rec.sid ||crlf;
msg := msg||'V$SESSION.SERIAL#=' ||session_rec.serial# ||crlf;
msg := msg||'V$SESSION.AUDSID=' ||session_rec.audsid ||crlf;
msg := msg||'V$SESSION.PADDR=' ||session_rec.paddr ||crlf;
msg := msg||'V$SESSION.USER#=' ||session_rec.user# ||crlf;
msg := msg||'V$SESSION.USERNAME='||session_rec.username||crlf;
msg := msg||'V$SESSION.COMMAND=' ||session_rec.command ||crlf;
msg := msg||'V$SESSION.OWNERID=' ||session_rec.ownerid ||crlf;
msg := msg||'V$SESSION.TADDR=' ||NVL(session_rec.taddr ,'Null')||crlf;
msg := msg||'V$SESSION.LOCKWAIT='||NVL(session_rec.lockwait,'Null')||crlf;
msg := msg||'V$SESSION.STATUS=' ||NVL(session_rec.status ,'Null')||crlf;
msg := msg||'V$SESSION.SERVER=' ||NVL(session_rec.server ,'Null')||crlf;
msg := msg||'V$SESSION.SCHEMA#=' ||session_rec.schema#||crlf;
msg := msg||'V$SESSION.SCHEMANAME=' ||NVL(session_rec.schemaname,'Null')||crlf;
msg := msg||'V$SESSION.OSUSER=' ||NVL(session_rec.osuser ,'Null')||crlf;
msg := msg||'V$SESSION.PROCESS=' ||NVL(session_rec.process ,'Null')||crlf;
msg := msg||'V$SESSION.MACHINE=' ||NVL(session_rec.machine ,'Null')||crlf;
msg := msg||'V$SESSION.TERMINAL=' ||NVL(session_rec.terminal ,'Null')||crlf;
msg := msg||'V$SESSION.PROGRAM=' ||NVL(session_rec.program ,'Null')||crlf;
msg := msg||'V$SESSION.TYPE=' ||NVL(session_rec.type ,'Null')||crlf;
msg := msg||'V$SESSION.SQL_ADDRESS=' ||session_rec.sql_address ||crlf;
msg := msg||'V$SESSION.SQL_HASH_VALUE=' ||NVL(TO_CHAR(session_rec.sql_hash_value) ,'Null')||crlf;
msg := msg||'V$SESSION.PREV_SQL_ADDR=' ||session_rec.prev_sql_addr||crlf;
msg := msg||'V$SESSION.PREV_HASH_VALUE='||NVL(TO_CHAR(session_rec.prev_hash_value),'Null')||crlf;
msg := msg||'V$SESSION.MODULE=' ||NVL(session_rec.module ,'Null')||crlf;
msg := msg||'V$SESSION.MODULE_HASH='||NVL(TO_CHAR(session_rec.module_hash),'Null')||crlf;
msg := msg||'V$SESSION.ACTION=' ||NVL(session_rec.action ,'Null')||crlf;
msg := msg||'V$SESSION.ACTION_HASH='||NVL(TO_CHAR(session_rec.action_hash),'Null')||crlf;
msg := msg||'V$SESSION.CLIENT_INFO='||NVL(session_rec.client_info ,'Null')||crlf;
msg := msg||'V$SESSION.FIXED_TABLE_SEQUENCE='||NVL(TO_CHAR(session_rec.fixed_table_sequence),'Null')||crlf;
msg := msg||'V$SESSION.ROW_WAIT_OBJ#=' ||NVL(TO_CHAR(session_rec.row_wait_obj#) ,'Null')||crlf;
msg := msg||'V$SESSION.ROW_WAIT_FILE#=' ||NVL(TO_CHAR(session_rec.row_wait_file#) ,'Null')||crlf;
msg := msg||'V$SESSION.ROW_WAIT_BLOCK#='||NVL(TO_CHAR(session_rec.row_wait_block#),'Null')||crlf;
msg := msg||'V$SESSION.ROW_WAIT_ROW#=' ||NVL(TO_CHAR(session_rec.row_wait_row#) ,'Null')||crlf;
msg := msg||'V$SESSION.LOGON_TIME=' ||NVL(TO_CHAR(session_rec.logon_time,'DD-Mon-YYYY HH24:MI:SS'),'Null')||crlf;
msg := msg||'V$SESSION.LAST_CALL_ET=' ||NVL(TO_CHAR(session_rec.last_call_et) ,'Null')||crlf;
msg := msg||'V$SESSION.PDML_ENABLED=' ||NVL(session_rec.pdml_enabled ,'Null')||crlf;
msg := msg||'V$SESSION.FAILOVER_TYPE=' ||NVL(session_rec.failover_type ,'Null')||crlf;
msg := msg||'V$SESSION.FAILOVER_METHOD='||NVL(session_rec.failover_method,'Null')||crlf;
msg := msg||'V$SESSION.FAILED_OVER=' ||NVL(session_rec.failed_over ,'Null')||crlf;
msg := msg||'V$SESSION.RESOURCE_CONSUMER_GROUP='||NVL(session_rec.resource_consumer_group,'Null')||crlf;
msg := msg||'V$SESSION.PDML_STATUS=' ||NVL(session_rec.pdml_status ,'Null')||crlf;
msg := msg||'V$SESSION.PDDL_STATUS=' ||NVL(session_rec.pddl_status ,'Null')||crlf;
msg := msg||'V$SESSION.PQ_STATUS=' ||NVL(session_rec.pq_status ,'Null')||crlf;
IF auditing THEN
msg := msg||'DBA_AUDIT_TRAIL.OS_USERNAME=' ||NVL(audit_rec.os_username,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.USERNAME=' ||NVL(audit_rec.username ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.USERHOST=' ||NVL(audit_rec.userhost ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.TERMINAL=' ||NVL(audit_rec.terminal ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.TIMESTAMP=' ||TO_CHAR(audit_rec.timestamp,'DD-Mon-YYYY HH24:MI:SS')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.OWNER=' ||NVL(audit_rec.owner ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.OBJ_NAME=' ||NVL(audit_rec.obj_name ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.ACTION=' ||audit_rec.action ||crlf;
msg := msg||'DBA_AUDIT_TRAIL.ACTION_NAME=' ||NVL(audit_rec.action_name ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.NEW_OWNER=' ||NVL(audit_rec.new_owner ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.NEW_NAME=' ||NVL(audit_rec.new_name ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.OBJ_PRIVILEGE='||NVL(audit_rec.obj_privilege ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.SYS_PRIVILEGE='||NVL(audit_rec.sys_privilege ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.ADMIN_OPTION=' ||NVL(audit_rec.admin_option ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.GRANTEE=' ||NVL(audit_rec.grantee ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.AUDIT_OPTION=' ||NVL(audit_rec.audit_option ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.SES_ACTIONS=' ||NVL(audit_rec.ses_actions ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_TIME=' ||NVL(TO_CHAR(audit_rec.logoff_time) ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_LREAD=' ||NVL(TO_CHAR(audit_rec.logoff_lread) ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_PREAD=' ||NVL(TO_CHAR(audit_rec.logoff_pread) ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_LWRITE='||NVL(TO_CHAR(audit_rec.logoff_lwrite),'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_DLOCK=' ||NVL(audit_rec.logoff_dlock ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.COMMENT_TEXT=' ||NVL(audit_rec.comment_text ,'Null')||crlf;
msg := msg||'DBA_AUDIT_TRAIL.SESSIONID=' ||audit_rec.sessionid ||crlf;
msg := msg||'DBA_AUDIT_TRAIL.ENTRYID=' ||audit_rec.entryid ||crlf;
msg := msg||'DBA_AUDIT_TRAIL.STATEMENTID=' ||audit_rec.statementid ||crlf;
msg := msg||'DBA_AUDIT_TRAIL.RETURNCODE=' ||audit_rec.returncode ||crlf;
msg := msg||'DBA_AUDIT_TRAIL.PRIV_USED=' ||NVL(audit_rec.priv_used,'Null')||crlf;
END IF;
msg := msg||'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'||crlf||crlf;
-- write the message to the error log file
log_file_handle := UTL_FILE.FOPEN (log_file_dir, log_file_name, 'A',maxlinesize);
UTL_FILE.PUT_LINE(log_file_handle,msg);
UTL_FILE.FCLOSE(log_file_handle);
-- send the message by Email
mail_conn := UTL_SMTP.open_connection(smtp_relay, mail_port);
UTL_SMTP.HELO(mail_conn, smtp_relay);
UTL_SMTP.MAIL(mail_conn, sender_address);
UTL_SMTP.RCPT(mail_conn, recipient_address);
UTL_SMTP.DATA(mail_conn, msg);
UTL_SMTP.QUIT(mail_conn);
END IF; -- client_program = MyProgram.exe
END IF;
END;
/ -
How to send mail to multiple recipients?
Pre Mavericks, I could open contacts book, select all contacts, drag over to the BCC field in an email and hit send. Can't do it post Mavericks installation. Why?
I figured it out! Type the name of the group in the BCC field and click on it from the drop down menu. All recipients within that group appear. Hit send.
-
My email is a yahoo account. The yahoo help advises I create a group then I won't have the problem. Can I do this in Thunderbird or do I have to use yahoo?
Yes, you can define a group (such as a family) within your address book. Then you can use that group name in addressing an email.
-
Send smartform to multiple users using std. smartform interface
Hello All,
Below is the requirement : -
While doing an external send against the custom output type in transaction VF02, smartform is automatically send to the appropriate email address as pdf attachment. This email address can be sold to party/bill to party etc and it is controlled using configuration.
Now the prb is, using such configuration we can send email to single email id only. I need to send the email to multiple users using the standard smartform interface ONLY i.e by using the parameter MAIL_RECEPIENT in the std. smartform interface.
I have alredy evaluated the below workarounds for the above solution, but we need to implement the above functionality using standard smartform interface only.
1) Convert the smartform OTF data to PDF format data and then send the PDF attachment via email to multiple recipients using the standard FM SO_NEW_DOCUMENT_ATT_SEND_API1.
2) Loop at the recipients table and within the loop pass different recipient to the interface parameter MAIL_RECIPIENT of smartform. Hence in this case smartform will be called within the loop which can cause performance issues incase of multiple recipients. Also the mail will be sent individually to every recipient.
3) I have already checked by passing the distribution list the parameter MAIL_RECEIPIENT but it does not work.
Looking forward for your responses.
Regards,
R.DoshiHi
Check if SAP Note 1260015 - Sending mail to multiple recipients is useful for your requirements.
Regards
Eduardo -
Mail to multiple recipients in sent mail index
When I send mail to multiple recipients (all in the "To:" field), for some reason when I view the Sent index, only the first recipient shows up. (If I open the message, I see all recipients listed.)
In Mail version 1, which I had been running on a prevoius machine with 10.2.8, all the recipients would appear in the sent mail index.
For example, let's say I email Joe, Tom, Gary. If I go to the Sent mailbox, I only see "Joe" in the "To" column. Before, I'd see "Joe, Tom, Gary."
Any way to change a setting to restore this? It makes it easier to see to whom I sent what.use string tokenizer to tokenize the string and then use this in ur smtp coding
message.addRecipients(Message.RecipientType.TO, to)
where 'message' is object of MimeMessage
and 'to' is array of Address
ex:-
Address[] to = new Address[count];
Earlier u must be using message.addRecipient(Message.RecipientType.TO, to)
where to is object of Address.
Sample code:-
suppose String posted from ur form is :-
to = "[email protected],[email protected],[email protected]"
StringTokenizer toAdd = new StringTokenizer(to,",");
Address[] address=new Address[toAdd.countTokens()];
int j=0;
while(toAdd.hasMoreTokens()){
address[j]=(new InternetAddress(toAdd.nextToken()));
j++;
}
Maybe you are looking for
-
Release campaign only after releasing parent marketing plan
Hi, My requirement is, campaign should be released only after parent MP is released. System doesn't allow to release campaign without releasing parent MP by standard. But I am using all user statuses in campaign and MP. I have blocked all system stat
-
LV 7.0 DSC as non administrator user
Hi all, is it possible to run LV 7 DSC as a user not having administrator rights ("at least" power user)? If I try to start LV 7 DSC as a power user, LV 7 wants to install the "Microsoft SQL Server Desktop Engine", but can't because it's not priville
-
Not able to use "Focus Area" in Photoshop!
I am using Ps Version 14.2.1x64 on a Windows 7 based PC in the Photography mode. When I click on Select, I do not have the feature "Focus Area" as a dialog box option to use. Why not?!?!?
-
Hello all, I am trying to encode in QT Pro useing H.264 The source is a iMovie .dv ext so its 720 x 480 or something like that. When I use H.264 and size to 278 x 170 I get a one or two pixel green line down the right side! It sems the same in Squeez
-
Encrypted external hard drive fail to unlock
Hi, My external hdd is few months old, I'm using Lion's encryption from release day. Only today, when I tried to connect my ext hdd, I typed the password. and from now on, the hdd led on the external is blinking. the password window is gray (like wai