Sending mail through multiple domains with iMS
I have iMS configured and working fine for multiple domains (users are
members of multiple domains). I have done this with a main email address
(main.com), and alternative email addresses to the other domains (alt1.com,
alt2.com...) so that there is one central mail location at (main.com). This
works great for receiving emails.
However, when I send email I would like to be able to show the FROM address
being from one of the alternate domains (alt1.com, alt2.com...) rather than
the main domain (main.com) sometimes. I have authentication turned on for
the sending messages, and users are logging in as ([email protected]). I assume
there is something I can add that will allow this to happen as long as a
valid address exists on my server. Any thoughts?
main domain: main.com (All mail is addressed from this domain)
alt domains: alt1.com, alt2.com...
Thanks in advance, Chris
BTW I am using iMS 5.1.
-Chris
I have iMS configured and working fine for multiple domains (users are
members of multiple domains). I have done this with a main email address
(main.com), and alternative email addresses to the other domains(alt1.com,
alt2.com...) so that there is one central mail location at (main.com).This
works great for receiving emails.
However, when I send email I would like to be able to show the FROMaddress
being from one of the alternate domains (alt1.com, alt2.com...) ratherthan
the main domain (main.com) sometimes. I have authentication turned on for
the sending messages, and users are logging in as ([email protected]). I
assume
there is something I can add that will allow this to happen as long as a
valid address exists on my server. Any thoughts?
main domain: main.com (All mail is addressed from this domain)
alt domains: alt1.com, alt2.com...
Thanks in advance, Chris
Similar Messages
-
Send mail through CL_BCS class with normal priority
Hello guys!!!
I'm trying to send email through CL_BCS class, and it's work fine!
But, always sent with high priority, and I need to send whith normal priority.
I tried this:
DATA: o_send_request TYPE REF TO cl_bcs,
o_document TYPE REF TO cl_document_bcs.
o_document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = msgbody
i_subject = subject
i_importance = '5' ).
And this:
CALL METHOD o_send_request->send_request->setu_priority
EXPORTING
i_priority = o_send_request->cp_priority_normal.
Unfortunately, don't works.
Any idea?
Thanks!!!
Kleber S. KieferHi,
Please try the following solution:
* set mail importance to normal
TRY.
lo_document ?= lo_send_request->document( ).
lo_document->set_importance( i_importance = '5' ).
CATCH cx_sy_move_cast_error.
ENDTRY.
In addition, in the Alert framework, which send emails with high priority, it controls the document's importance and then send out the emails with high priority.
* create send request, document etc..
TRY.
lo_document = cl_document_bcs=>create_document(
i_type = l_texttype
i_text = lt_text
i_importance = '1'
i_language = ls_langu_recipient-langu
i_subject = l_subject_short
i_length = l_so_obj_len ). -
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 -
When I try to send mail to multiple addresses, it tells me it cant send with selected server. It sends mail to one address fine.
contact your email service provider and ask them (it might treat multiple e-mails as SPAM)
-
Sending mails through PL/SQL in different domains
Hi all,
I am having procedure like this.....
create or replace procedure send_test_message
IS
mailhost VARCHAR2(64) := 'xxx.com';
sender VARCHAR2(64) := '[email protected]';
recipient VARCHAR2(64) := '[email protected]'; /* Error comes in this */
--recipient VARCHAR2(64) := '[email protected]'; /* This is working fine */
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
-- If we had the message in a single string, we could collapse
-- open_data(), write_data(), and close_data() into a single call to data().
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, 'This is a test message.' || chr(13));
utl_smtp.write_data(mail_conn, 'This is line 2.' || chr(13));
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
dbms_output.put_line('Successfully sends......');
EXCEPTION
WHEN OTHERS THEN
-- Insert error-handling code here
dbms_output.put_line(sqlerrm);
END;
When i called this procedure, i am getting following error....
ORA-29279: SMTP permanent error: 550 5.7.1 [email protected].. Relaying denied. IP name lookup failed [219.120.53.234]
[email protected] -- This mail id is mine and it exists.
Any help is appreciated.
Thanks in advance,
Pal> May be silly for you, but i like to know,
Anybody (different provider/domain) can send mails through his mobile to my
mobile (different provider/domain). How it is possible ?
I send an e-mail to you. My mail reader contacts my e-mail server. The e-mail server sees that I'm from the same domain. It accepts my e-mail - it ignores (for now) what the recipient's domain are.
My domain's e-mail server looks at the recipient and sees your domain. It now attempts to contact your domain's e-mail server. If it fails, it sends me an e-mail telling me of that failure.
If it succeeds, it tells your e-mail server that it has an e-mail for you from me. Your e-mail server sees that the recipient is on its domain. It therefore accepts the e-mail and delivers it to your post box. Your e-mail server is not concerned about the originator (me and my domain) as the delivery is for someone on its domain.
Only when the recipient and sender are both "unknown" to the mail server, it will/should refuse to accept that e-mail and try to relay it between one and another domain.
Bottom line - when sending an e-mail the SMTP server expects that you are either on the same domain as it (in which case it is there to service you), or that you are delivering an e-mail for someone on its domain (that someone being serviced by the server). -
Hi,
I have a requirement where I need to send mail to multiple users, for this I was following below link
Re: Email to Multiple Email Address through WF
Followed the above link and created 2 users with Notification Preference as MAILHTML and added to a role having email id as NULL and Notification Preference as MAILHTML . But I am not able to send mails rather it is going as notifications to the user Worklist.
Please help me to resolve this issue.
Regards,
PrateekHi, Andy,
Use the Oracle-supplied package utl_mail for sending email messages:
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/u_mail.htm#i1001258
It would be easier if you did not use dbms_output, or, if you really wanted to, do not call it directly. Write your own procedure (let's call it add_to_message) that concatenates a string to the end of a message that will ultimately be sent as an email. If you want to display the string using dbms_ouptut.put line as well as append it to the message, then call dbms_ouptut.put line inside add_to_message.
If you really must get the text from dbms_output, use dbms_output.get_line (or get_lines)
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_output.htm#i999346 -
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 PMHi, 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;
/ -
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 -
Problem in sending mails to multiple persons
Hi,
I have a problem in sending mails to multiple people....
My mail is using the local smtp server...The mail is to be send to multiple addresses in to and cc.
for e.g the to address will have --> [email protected];[email protected]
cc address will have --> [email protected];[email protected]
How do this i.e set multiple to and cc address...
My function that sends mail from my ejb looks like this...
// create some properties and get the default Session
Properties props = new Properties();
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props, null);
try{
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
//I HAVE TO SET MULTIPLE "TO" ADDRESSES HERE INSTEAD OF JUST 1
InternetAddress[] address = {new InternetAddress(to)};
msg.setRecipients(Message.RecipientType.TO, address);
//I HAVE TO SET MULTIPLE "CC" ADDRESSES HERE INSTEAD OF JUST 1
InternetAddress[] addresscc = {new InternetAddress(cc)};
msg.setRecipients(Message.RecipientType.CC, addresscc);
msg.setSubject(msgSubj);
msg.setSentDate(new java.util.Date());
msg.setText(msgText);
Transport.send(msg);
}catch (MessagingException ex) {
System.out.println("\nException handling in javaMail.java :" + ex);
Please help me out with a solution!!!Thanks in advance.
Thanks
RahulHi all,
Got the solution...
We have to use addRecipients method of the Message class to add as many receipts we want to set.
example: Message.addRecipients(type,address).
Thanks
Rahul -
Problem in sending mail to multiple administrators
Hi,
I have a requirement to send mail to multiple administrators.
The flow is as follows:
The user submits feedback form then the mail should be send to all the administrators with the feedback provided by user.
The code is as follows:
DECLARE
lc_body_html varchar2(4000);
P_TO VARCHAR2(50);
P_FROM VARCHAR2(50);
P_BODY_HTML VARCHAR2(250);
P_SUBJ VARCHAR2(10);
lc_usernames VARCHAR2(100);
CURSOR lcu_username IS SELECT user_name FROM emea_pmr_users WHERE is_admin='Y';
lr_username_rec lcu_username%ROWTYPE;
BEGIN
OPEN lcu_username;
LOOP
FETCH lcu_username INTO lr_username_rec;
EXIT WHEN lcu_username%NOTFOUND;
lc_usernames :=lc_usernames||lr_username_rec.user_name||',' ;
END LOOP;
CLOSE lcu_username;
lc_usernames :=RTRIM(lc_usernames,',');
lc_body_html := :P34_FEEDBACK_TEXT;
HTMLDB_MAIL.SEND(
P_TO => lc_usernames,
P_FROM => :APP_USER,
P_BODY => lc_body_html,
P_BODY_HTML => lc_body_html,
P_SUBJ => 'Test Mail');
END;
The problem here is only for the last record in table the mail is going successfully.
If I hard code p_to as '[email protected],[email protected],[email protected]'
then the mail is being send to all the 3 users successfully.
Where I am going wrong can anyone let me know?
Thanks in advance.
Sarvani.Sarvani,
1) What do you mean by "the problem here is only for the last record in table the mail is going successfully."
2) For an e-mail which doesn't work, what is the value of APEX_MAIL_QUEUE.MAIL_TO in the mail database view?
Joel -
Error while sending mail through SMTP
Hi,
We are getting the following error while trying to send mail through SMTP.
'554 ERROR_MESSAGE_STATE: SMTP_NO_HANDLER( host:1-,subrc:0001)'
Please advice,
Regards,
SamHi All,
Configured SMTP as per the note 455140,i can able to send mails from SAP to the out side world,
mails in SAP.When i tried the test to check whether the SAP system is correctly set up to receive e-mails as per the note 607108, iam getting a connection closed message as below.
afgdev:pgdadm> telnet afgdev 2500
Trying...
Connected to afgdev.
Escape character is '^]'.
220 afgdev.abc.ae SAP 6.40(52) ESMTP service ready
helo afgdev
250 afgdev.abc.ae
mail from:<[email protected]>
250 Ok
rcpt to:<[email protected]>
250 Ok
data
354 Enter mail, end with "."
Hello,This is a test.
Connection closed.
afgdev:pgdadm>
rgds
Sam -
Uncaught Exception occured while sending mail through abap code.
Hi,
Uncaught Exception occured while sending mail through abap code.Run time Errors "UNCAUGHT_EXCEPTION" occured after excuting the call method CALL METHOD SEND_REQUEST->SEND( ).kindly help in resolving the issue.HI,
Runtime Error: UNCAUGHT_EXCEPTION details.
Runtime Errors UNCAUGHT_EXCEPTION
Exception CX_ADDRESS_BCS
Short text
An exception occurred that was not caught.
What happened?
The exception 'CX_ADDRESS_BCS' was raised, but it was not caught anywhere along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program 'SAPLZSEND_MAIL' has to be
terminated.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_ADDRESS_BCS', was not caught in
procedure "SEND_MAIL" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
An exception occurred
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UNCAUGHT_EXCEPTION" "CX_ADDRESS_BCS"
"SAPLZSEND_MAIL" or "LZSEND_MAILU01"
"ZSEND_EMAIL"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"SEND_MAIL" "(FORM)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
Please help me to resolve this issue. -
Failed to send mail to external domain via portal
Hi Gurus,
By following the configuraion instructions in <b>SAP library - Collaboration - Groupware - Installing and Configuring E-Mail Connectivity</b>, I managed to send mail to recipients who reside in same domain e.g. <b>[email protected]</b> via portal.
However, I failed to send mail to external domain e.g. <b>[email protected]</b>. I got the following error message:
The mail could not be sent to the specified recipients com.sap.ip.collaboration.gw.impl.transport.javamail.exception.MailSendException: The mail could not be sent to the specified recipients
at com.sap.ip.collaboration.gw.impl.transport.javamail.JavaMailTransport.sendMail(JavaMailTransport.java:183)
--------- exception is chained. Original exception ------------
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:804)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:320)
Please help.
Thanks alot.Hi Ajey,
Thanks for your reply. I had tried your suggestion but same problem occurred with same error output.
Actually, I encounterred this error message before in my <b>Microsoft Outlook</b>, where System Admin returned me a mail saying that, my mail was undeliverable with the same error message. But this can be solved by applying the <b>Internet Email Account Setting - Outgoing Server - My outgoing server (SMTP) require authentication</b>.
So I am wondering,
1) This problem is caused by SMTP server?
2) Is there any workaround (like the Outlook Setting) I can configure in Portal?
Do you have any idea?
Thanks,
HauChee -
Error: in sending mail through dynamics actions
Hi Friends,
I have a problem in sending mail through dynamics actions . In this we pass a subroutine in dynamics actions which send an mail when promotion action occured.
Problem is that sometimes it will send an mail or sometimes not. I have no idea to solve this problem.
Can anyone suggest me .
Thanks ,
Anish
Moderator message : Duplicate post locked. Continue with thread [send mail through dynamic actions|send mail through dynamic actions].
Edited by: Vinod Kumar on Sep 5, 2011 10:19 AMthis is where i created the keystore.jks file
I navigated to the location C:\Program Files\Java\jdk1.6.0_13\bin in command prompt and typed the following command to create the keystore
keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jksI was asked to set the password for keystore and then i was asked the question "Trust this certificate? [no]:" for which i gave yes.
If this is not the right place to create the keystore.jks can you please tell me what is correct location to create the keystore file. -
About send mail through Outlook Express
I send mail through outlook . but system shows "your server has been terminate suddently. The possible reasons include servers error , NetWork error or long time among inactive status ." I promise the setting of POP3 and SMTP is right. Who can help me ? thank you.
I would start first with, do you know that the smtp setting for your server actually points to a Sun Java Enterprise Messaging Server?
what do you get on a command line when you do:
telnet <what you have for smtp> 25
?
Maybe you are looking for
-
How to do Subsitution of Tables
I need to looking for every tables that have one column with the same name. (Select table_name from dba_tab_columns where column_name like 'ACCOUNTING') After, I need to looking for each one tables a value into that column. But my problem is how to d
-
Just Updated iTunes and Now it won't read my iPod
I have an iPod nano. I just updated the latest version of iTunes. Now, when I plug in the iPod to my laptop I get an error message which says "The iPod Cassandra cannot be used because it requires iTunes version 4.9 or later." What can i do to be abl
-
Any ideas?
-
Migration Oracle 8.17 from Solaris 8 to Solaris 10
Is it possible to migrate Oracle 8.1.7 from Solaris 8 to Solaris 10? I find out the papers or the practices from internet that were done before. Do you have any documents said that or gurantee success?
-
XI system idoc transfer to SAP system.
hi , this is parthasarathi,i am using ALE/IDOC.basically i need to transfer idoc from XI system to SAP system. can any one help me out in this case. my system is SAP system ie inbound system. i am using message type HRMD_A and idoc type is HRMD_A04.