Send email to multiple users on form submit
I created a form with Shuttle object to select email addresses. Shuttle allows multiple select. But I am not able to send email to multiple email ids. Email is sent to only the first email id.
Please advice me on how to send emails to multiple ids on submit from shuttle
Thanks
Latha
Ok try this:
DECLARE
l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
l_body CLOB;
BEGIN
l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(v(‘P8_EMPLOYEE’));
FOR z IN 1..l_vc_arr2.count LOOP
l_body := 'Thank you for your interest in the APEX_MAIL
package.'||utl_tcp.crlf||utl_tcp.crlf;
l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
l_body := l_body ||' The Application Express Dev Team'||utl_tcp.crlf;
apex_mail.send(
p_to => l_vc_arr2(z),
p_from => '[email protected]', -- change to a real senders email address
p_body => l_body,
p_subj => 'APEX_MAIL Package - Plain Text message');
END LOOP;
END;
Thanks
Paul
Similar Messages
-
Send email to multiple users using form
I am using following code to send email from forms.
But i want to send email to multiple users like atleast 10 users
It i sworking for one user.
If i give mail_pkg.send('tim@'oracle.com;[email protected]','Testing Oracle forms to send email','Testing oracle forms to send email','c:/x.pdf');
The email is not going
Can anybody help how to send to multiple users
Thanks for your help
T
PACKAGE Mail_pkg IS
session OLE2.OBJ_TYPE; /* OLE object handle */
args OLE2.LIST_TYPE; /* handle to OLE argument list */
procedure logon( Profile IN varchar2 default NULL );
procedure logoff;
procedure send( Recp IN varchar2,
Subject IN varchar2,
Text IN varchar2,
Attch IN varchar2
END;As said,
Reports9i is better than Reports6i as far as sending emails is concerned. Reports9i allows you to send Reports in different formats as email attachements (PDF v3 is only one option). You can set subject, cc, bcc and some body text the way you want it. The Reports server only needs the address of a SMTP Server and you are ready to go. In Reports6i this is a bit more limited as you are not able to provide your own subject and body texts.
I know that you can do this with PL/SQL from teh databae, but never tried it before.
There is another option, which is to use a Java Bean in Forms for email. Thsi only works on the Web and a demo is included in teh Forms9i demos that can be downloaded from OTN. Though the demo is written for Forms9i it should work with Forms6i as well (not the Forms demo files because they are created in Forms9i).
Fran -
Help with sending emails to multiple users.
Currently we have a process to send mail to muliple users by looping through the list of users and sending each individual an email
<Action id='1' name='sendEmail' application='com.waveset.provision.WorkflowServices'>
<Argument name='op' value='notify'/>
<Argument name='template' value='$(template)'/>
<Argument name='toUser' value='$(tuser)'/>
<Argument name='catch' value='notificationException'/>
</Action>
The variable tuser contains a single email address.
Is there any way to setup tuser to contain multiple email addresses?
I have tried passing a list and a string separated by colons (ex: <s>[email protected]; [email protected]</s>) and neither one works.
Question 2
Is it a bad idea to try and send email to up to 50000 users at once using IDM? Besides the fact that I would need to search for specific users and get their email addresses based on their capabilities.Hi,
For sending emails to multiple users, use to instead of toUser. Put the names in comma seperated values
<Action id='0' application='com.waveset.provision.WorkflowServices'>
<Argument name='op' value='notify'/>
<Argument name='template' value='$(template)'/>
<Argument name='to' value='$(to)'/>
<Argument name='cc' value='$(cc)'/>
<Argument name='catch' value='notificationException'/>
</Action>
You can use IDM to send emails.
it will be a good idea to break down the email that you are sending into groups/batches. If possible, you can send email to DL s
Else, you can segregate the users based on roles and send emails. This will reduce the load. Hope it helps
Regards
Arjun
Edited by: arjun.sengupta on Dec 4, 2012 3:26 AM -
Send Emails to Multiple Users ?
Hi,
I am working on the requirement where I need to create workflow in which I am sending email to multiple users. I have receiver list in a 'Z' Table. So I have to fetch those users from the 'Z' table on some conditions and send emails to them. I am send email to single user mentioned statically in Receipent box but I need to find the receivers dynamically and not able to send email to multiple users.
Please help me in this.
Thanks,
KetanHi Ketan,
First af all create one MULTILINE container in your workflow say LT_EMAIL. its type should be SOXNA-FULLNAME.
Then thorugh some activity step, fill all the recepient's email addresses in workflow container LT_EMAIL. Then create one activity step type to send an email using SENDRASKDESCRIPTION method of business object SELFITEM. in the ADDRESSSTRING pass the multiple container LT_EMAIL and in TYPEID pass 'U'.
refere below link for BO programming in sap workflow Useful SAP Business Object Type programming macros.
Regards,
Ibrahim -
Hi All,
I am working with SharePoint 2013 designer workflow. we are using office 365.
Our requirement to send email to multiple users, get the user groups from lookup list people and groups column.
But SP designer sending emails to the first user alone.
Please guide me to proceed.
Advance Thanks.
Regards
Jenkins NS
Thanks and Regards Jenkinsfinally I got a solution
Identified a workaround to solve the issue using SharePoint designer.
Step 1
Create a lookup list Example department
Columns
Title (by default) – Single line of text
Users – Person or Group
Emails – Multiple lines of text
hidden the Emails column (go to content type and set the column as hidden)
Create a SharePoint designer Workflow
Start Workflow automatically when an item is created
Also Start Workflow automatically when an item is changed
Workflow Stage 1
Set Emails to current Item: Users
The workflow will get all users email ids and add in the Emails column delimiter as semicolon.
Step 2
Create a custom list to get the email ids and send email
Create a lookup column ex: analysis and refer department list, Allow multiple values
Then Create a SharePoint designer workflow
full details workflow steps please follow below
URL
http://jenkinsblogs.com/2015/04/30/how-to-send-emails-to-multiple-users-from-lookup-list-people-picker-field-using-sharepoint-designer-workflow/
Thanks and Regards Jenkins -
All experts:
I want to send an email to multiple user, I use the FM:SO_NEW_DOCUMENT_SEND_API1,
this FM can to mutiple user's email address ,but it can not re-set the email sender.
another FM is: EFG_GEN_SEND_EMAIL, this FM can re-set the email sender and email receiver, but this only can send one email to one receiver.
My question is, can anyone tell me how to send email to mutiple user,
e.g.: sender: abc/at/abc.com
receiver 1 cdg/at/abc.com
receiver 2 dd/at/hotmail.com
I want to send this email to both them at a time. and i can dynamic set the email sender.
Thanks in advance.Hi,
It is a good practice to write a function to send email and use this function as much as you want.
Please create the following function exactly,
it will help you:
You see imports and exports of this function:
TO1 through TO3 is the mail adresses you can pass. You can use just one of them or all of them.
And you can use the BODY STRUCTURE TLINE OPTIONAL
as the contents of the email.
Hope helps.
FUNCTION Z_PA_SENDMAIL.
*"*"Local interface:
*" IMPORTING
*" VALUE(TO1) LIKE ADR6-SMTP_ADDR
*" VALUE(TO2) LIKE ADR6-SMTP_ADDR OPTIONAL
*" VALUE(TO3) LIKE ADR6-SMTP_ADDR OPTIONAL
*" VALUE(SUBJECT) LIKE TZV51-XBRIEF
*" VALUE(ATT_TYPE) LIKE SOOD-OBJTP OPTIONAL
*" VALUE(ATT_NAME) LIKE SOOD-OBJNAM OPTIONAL
*" VALUE(ATT_DESC) LIKE SOOD-OBJDES OPTIONAL
*" VALUE(NOTIF_DEL) LIKE SOMLRECI1-NOTIF_DEL OPTIONAL
*" VALUE(NOTIF_READ) LIKE SOMLRECI1-NOTIF_READ OPTIONAL
*" VALUE(NOTIF_NDEL) LIKE SOMLRECI1-NOTIF_NDEL DEFAULT 'X'
*" VALUE(SEND_AS) LIKE SOEXTRECI1-RECEIVER DEFAULT SPACE
*" EXPORTING
*" VALUE(SENT_FLAG) LIKE SOPR-FLAG1
*" TABLES
*" BODY STRUCTURE TLINE OPTIONAL
*" ATTCH STRUCTURE SOLISTI1 OPTIONAL
*" EXCEPTIONS
*" TOO_MANY_RECEIVERS
*" DOCUMENT_NOT_SENT
*" OPERATION_NO_AUTHORIZATION
data: doc_chng like sodocchgi1.
data : objpack like sopcklsti1 occurs 10 with header line,
objhead like solisti1 occurs 10 with header line,
objbin like solisti1 occurs 10 with header line,
objtxt like solisti1 occurs 10 with header line,
reclist like somlreci1 occurs 10 with header line.
data: tab_lines like sy-tabix.
data: sent_to_all like sonv-flag.
objtxt[] = body[].
objbin[] = attch[].
doc_chng-obj_name = 'Mail'.
doc_chng-obj_descr = subject.
* Creation of the entry for the compressed document
describe table objtxt lines tab_lines.
clear objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
read table objtxt index tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
doc_chng-doc_size = doc_chng-doc_size + objpack-doc_size.
objpack-doc_type = 'RAW'.
objpack-obj_name = 'Body'.
objpack-obj_descr = subject.
append objpack.
describe table objbin lines tab_lines.
if tab_lines > 0.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
read table objbin index tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objbin ).
doc_chng-doc_size = doc_chng-doc_size + objpack-doc_size.
objpack-doc_type = att_type.
objpack-obj_name = att_name.
objpack-obj_descr = att_desc.
append objpack.
endif.
reclist-rec_type = 'U'.
reclist-notif_del = NOTIF_DEL.
reclist-notif_read = NOTIF_READ.
reclist-notif_ndel = NOTIF_NDEL.
reclist-receiver = to1.
append reclist.
if not to2 is initial.
reclist-receiver = to2.
append reclist.
endif.
if not to3 is initial.
reclist-receiver = to3.
append reclist.
endif.
delete reclist where receiver eq space.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = doc_chng
put_in_outbox = ' '
commit_work = 'X'
* SENDER_ADDRESS = send_as
importing
sent_to_all = sent_flag
tables
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
case sy-subrc.
when 0.
* SUCCESS
when 1.
raise TOO_MANY_RECEIVERS.
when 2.
raise DOCUMENT_NOT_SENT.
when 4.
raise OPERATION_NO_AUTHORIZATION.
when others.
raise OTHERS.
endcase.
ENDFUNCTION. -
I am using Apex 4.1 and need to send email based on certain condition.
I need to send email to two people A and B if APPUSER is based in APAC and otherwise send email to person C
I have the cursor that gets this information but do not know how to use this in the code for apex_mail.send
How do I apply the values returned from cursor to the below code ????
open mailcursor (this cursor returns A and B or just C )
apex_mail.send(
p_to => XXXXXXXXXX ( it has to send to two people or one based on value fetched from cursor ) ,
p_from => '[email protected]',
p_cc => NULL,
p_body => '***** This is a system generated message, please do not reply to this *****'||
chr(10) || utl_tcp.crlf || 'Please check for the data '||
chr(10) || utl_tcp.crlf || 'As Employee '||:P8_EMP_EMAIL||' has raised request on application '||
chr(10) || utl_tcp.crlf ||'Thanks',
p_subj => 'New Request Alert' );LKSwetha wrote:
I am using Apex 4.1 and need to send email based on certain condition.
I need to send email to two people A and B if APPUSER is based in APAC and otherwise send email to person C
I have the cursor that gets this information but do not know how to use this in the code for apex_mail.send
How do I apply the values returned from cursor to the below code ????
open mailcursor (this cursor returns A and B or just C )Please post code using <tt>\...\</tt> tags.
apex_mail.send(
p_to => XXXXXXXXXX ( it has to send to two people or one based on value fetched from cursor ) ,
p_from => '[email protected]',
p_cc => NULL,
p_body => '***** This is a system generated message, please do not reply to this *****'||
chr(10) || utl_tcp.crlf || 'Please check for the data '||
chr(10) || utl_tcp.crlf || 'As Employee '||:P8_EMP_EMAIL||' has raised request on application '||
chr(10) || utl_tcp.crlf ||'Thanks',
p_subj => 'New Request Alert' );As it says in the documentation<tt>apex_mail.send</tt> documentation for the <tt>p_to</tt> parameter:
Valid email address to which the email will be sent (required). For multiple email addresses, use a comma-separated list -
How to send an email to external user (offline form) from se38
Hi all
how to send an email to external user (offline form) from se38 and upload the same from recipent.
we have sent mail using scripts and smartforms but couldnt do here. It will be helpful if you can give us any sample code
regards
mohammedHi,
Have a look at this thread [Re: Sending PDF forms (created using SFP) as Email Attachment] i explain all the solution with a sample code .
Hope it's help you
regards -
Send EMail to Multiple external users
Hi
Is there a way to send EMails to multiple external users dynamically. I can see that we can send EMails to only static Email addresses for multiple external users.
Thanks
Vidyadharhttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10057e20-2ca2-2d10-1b91-a1b9a8c8e634
-
Send email from PA30 user exit
When I try to send an email from user exit in ZXPADU02 it never makes it to SOST. WIll always go to SBWP outbox if I set the flag but never gets sent to receiver address.
If I paste the following code into a report it works fine. Is there some other parameter for this FM or some additional process needed to send email from a user exit?
DATA: maildata TYPE sodocchgi1.
DATA: mailtxt TYPE TABLE OF solisti1 WITH HEADER LINE.
DATA: mailrec TYPE TABLE OF somlrec90 WITH HEADER LINE.
CLEAR maildata.
REFRESH: mailtxt, mailrec.
maildata-obj_name = 'SRVC_EMAIL'.
maildata-obj_descr = 'Email test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'Test line from user exit'.
APPEND mailtxt.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
APPEND mailrec.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.Put the function call 'SO_NEW_DOCUMENT_SEND_API1'
in a report Program & SUBMIT that report from ZXPADU02.
Arya -
On OnPremise, Sending email to multiple recipients doesn't work with SendEmail method
Hi,
We are creating a site collection on OnPremise from App by using Sharepoint Client API's (16 version).
After creation of site collection, we are sending an email to all site collection administrators. But we found that email is being sent to the only first person mentioned in the "To" list. For sending email we are using following method "Microsoft.SharePoint.Client.Utilities.Utility.SendEmail()".
We tried different scenarios by passing alternately domain username and email address.
Here are the findings for the different scenarios for the "To" field:
1) "domain\user1; domain\user1" => sends email to first user
2) "[email protected]; [email protected]" => sends email to both emails (at least shows in inbox To field, two occurances of email)
3) "domain\user1; domain\user2" => sends email to first user
4) "[email protected]; [email protected]" => sends email to first user
Here is the code we are using:
EmailProperties properties = new EmailProperties();
properties.To = to.ToList();
if (cc != null)
properties.CC = cc;
properties.Subject = subject;
properties.Body = body;
Utility.SendEmail(context, properties);
context.ExecuteQuery();
Please let us know what is going wrong here.
Thanks in advance for your valuable inputs.
Br,
Shriram
Shri07According to the R16 Admin preview guide;-
"Send Email to Multiple Recipients
Expression Builder is now linked to the email address text field that is presented when the Specific Email Address
option is selected. Workflow administrators can enter multiple email addresses directly, or click the "fx" icon
beside the field, and use Expression Builder to define expressions that evaluate to one or more email addresses.
The benefit of this feature is that emails can be stored on any text field in the base record and multiple emails can
be sent using one workflow action. "
But how that works exactly is not clear, I have tried commas, semi-colons, spaces, apostrophes, doublequotes, to separate and try to establish the correct syntax without luck.
Bob - Perhaps you can do some digging and find out the correct syntax for multiple addresses? -
Error while sending email to Multiple Recipients
Hi,
I am trying to send email to multiple recipients .It works fine if all the email-addresses are valid. If even one is invalid throws exception .I wish to send it all the valid addresses even if some are invalid as this email will be going to 3000 users some of them will be wrong addresses.
Help is greatly appreciated.
-ksg
Exception thrown:
Exception in SendEmail.setAddress as :javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 <[email protected]>... User unknown
Here is the main piece of code:
message.saveChanges();
Transport transport = session.getTransport("smtp");
transport.connect("myhost", "", "");
transport.sendMessage(message, message.getAllRecipients());
transport.close();Hi there,
Well I find the easiest way is to use a comma delimited string with the following bit of code.
msg.setRecipients(
addrType,
InternetAddress.parse(smtpAddress, false));
addrType will be TO,CC or BCC
smtpAddress is a comma delimited string that I get from the results of a SQL Select request (looks something like "[email protected],[email protected],....,....,...."
The boolean false is to prevent the parse checking the validity of the SMTP addresses as I prefer to deal with this by letting the SMTP server tell me which addresses are no good.
Hope this helps,
SH -
How to create a new role : Need to send notifications to multiple users.
Hi All,
I have a requirement where in I need to send notifications to multiple users
and no. of users in the list is not fixed.i.e. this builds up dynamically.
Kindly let me know how do I achieve this.
Also wanted to know where form the Workflow roles get created i.e. who inserts data into wf_roles and wf_user_roles tables. Is there any UI to create roles and associate users with them.
Thanks,Hi,
Yes - by default all responsibilities are defined as roles in the Workflow directory. You just need to identify the role that corresponds to the responsibility (look at ORIG_SYSTEM and ORIG_SYSTEM_ID columns, IIRC) and then send the notification to the role.
HTH,
Matt
WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
Have you read the blog at http://thoughts.workflowfaq.com ?
WorkflowFAQ support forum: http://forum.workflowfaq.com -
How to convert Xstring to PDF format and send pdf to multiple user
Hi to all
can any one provide me saple code to convert Xstring to PDF format and send pdf to multiple user
i have searched the SDN , but cant get any proper soulution.
I shall be thankful to you for this.
Regards
Pavneet RanaUse function module 'SCMS_XSTRING_TO_BINARY' to convert from XString to a Binary table. Just like this:
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_xstring_pdf
append_to_table = ' '
TABLES
binary_tab = lt_doc_content.
To send the email in an OO way you should user class CA_SEND_REQUEST_BCS. Take a look to program BCS_EXAMPLE_6 or any of the test programs in package SBCOMS. -
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
Maybe you are looking for
-
Error in loading the WSDL file
hi when i am creating a Adaptive Webservice model with the sneak preview 2004s while Choosing the published service from UDDI i am getting and error called "Error in loading the WSDL file" i have gone through the log files it basically saying that Ca
-
What's the benefits of Illustrator CC over Illustrator CS3 for print design?
What's the benefits of Illustrator CC over Illustrator CS3 for print design? I'd like to know the advantages and features – all those I read about are to do with EPUB, collaborative working, teams or digital designs, and those don't reflect my work.
-
I have a question about my iPhone data usage
Is there a way to check my data usage on my iPhone in the setting app?
-
PC's can't open my attachments
When I send an attachment to a colleague with a PC they receive a garbled message. I've always sent window friendly files in universal fonts. Is it something I'm doing? or something with their PC.
-
Unable to install the IOS version 4.3 on iPod Touch and iPhone 4 you know why?
Unable to install the IOS version 4.3 on iPod Touch and iPhone 4 you know why?