Sending an email to the user if the WEBi scheduling failed in CMC
Hello Everyone,
Current scenario :
I am scheduling WEBi report through CMC and the report is going to end user email as an excel attachment.
Desired Functionality :
What happens is if the scheduling fails due to some reason. The email does not go to the end user on a particular date and then he complaints.
What i need here an email sending option that if the WEBi scheduling has been failed in CMC an email should go to the user saying : " The WEBi scheduling has failed. The team is working on it " . (This is just a sample message)
So the idea is to send an email to the user when the WEBi scheduling fails in the CMC. How to achieve this ?
Regards,
Ashutosh Singh
Hi Ashutosh,
You can send an alert email to a group when the schedule fails to run by choosing the "A job has failed to run" option under notification.
You can see this option only if you schedule the report through CMC.
Regards
Sunil
Similar Messages
-
Send Welcome Email to New User using the Scripting Agent
Hi
I require some assistance please. I have found a number of scripts online to send a Welcome Email to new users whereby they make use of the ScriptingAgent.xml file.
I like the way the scripts have been configured and have mashed up one or two scripts together for my desired result however when testing in my lab (Exchange 2013) I have found tow problems.
The problems are:
1. When creating a new user and mailbox (New-Mailbox) via the ECP the script throws out an error which I will post later in this post. The mailbox is created fine but it does not send out a welcome email. When a user is created in ADUC and then a mailbox
is created (Enable-Mailbox) the welcome email is sent out correctly.
2. In the script i have a section to check for NewUser00 in the HTML file and replace that with the Users Name and Surname, however this does not work correctly, I just come up blank:
The Script:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration version="1.0">
<Feature Name="WelcomeEmail" Cmdlets="New-Mailbox,Enable-Mailbox">
<ApiCall Name="OnComplete">
if($succeeded) {
# Waiting for synchronization after mailbox has been created.
Set-ADServerSettings -ViewEntireForest $true
Start-Sleep -s 10
# New-Mailbox triggered. Taking SamAccountName parameter.
if ($provisioningHandler.UserSpecifiedParameters.Contains("SamAccountName") -eq $true) {
$UsrSamAccountName = $provisioningHandler.UserSpecifiedParameters["SamAccountName"]
$USRdfirst = $provisioningHandler.UserSpecifiedParameters["FirstName"]
$USRdlast = $provisioningHandler.UserSpecifiedParameters["LastName"]
$UsrAlias = (Get-Mailbox -Filter {SamAccountName -eq $UsrSamAccountName}).Alias.ToString()
$USRdname = $USRdfirst + " " + $USRdlast
# Enable-Mailbox triggered. Taking Identity parameter, this is the only one avalaible in this case.
if ($provisioningHandler.UserSpecifiedParameters.Contains("Identity") -eq $true) {
$UsrIdentity = $provisioningHandler.UserSpecifiedParameters["Identity"].ToString()
$USRdfirst=$provisioningHandler.UserSpecifiedParameters["FirstName"]
$USRdlast=$provisioningHandler.UserSpecifiedParameters["LastName"]
$UsrAlias = (Get-Mailbox -Identity $UsrIdentity).Alias.ToString()
$USRdname= $USRdfirst + " " + $USRdlast
# Defining variables.
$UsrAddr = (Get-Mailbox -Filter {Alias -eq $UsrAlias}).PrimarySmtpAddress.ToString()
$UsrOU = (Get-Mailbox -Filter {Alias -eq $UsrAlias}).OrganizationalUnit
# Sending email notification to the user in specific OU.
if ($UsrOU -match "Contoso.com") {
# HR #
$fromHR="[email protected]"
$SubjectHR="'Welcome to Contoso'"
$BodyHR = [string] (get-content ("c:\welcome\WelcomeMSG.htm"))
$BodyHR = $BodyHR -replace "NewUser00",$USRdname
$fileHR = "c:\welcome\WelcomeMSG.htm"
$smtp="192.168.x.x"
Send-MailMessage -From $fromHR -To $UsrAddr -Subject $SubjectHR -Body $BodyHR -BodyAsHtml -Encoding ([System.Text.Encoding]::UTF8) -SmtpServer $Smtp
# Clearing variables. Each one in its own line in order to prevent error messages from being shown on EMC.
if ($UsrAlias) { Remove-Variable UsrAlias }
if ($UsrAddr) { Remove-Variable UsrAddr }
if ($UsrOU) { Remove-Variable UsrOU }
if ($UsrMsg) { Remove-Variable UsrMsg }
if ($UsrIdentity) { Remove-Variable UsrIdentity }
if ($UsrSamAccountName) { Remove-Variable UsrSamAccountName }
</ApiCall>
</Feature>
</Configuration>
The Error for issue 1:
The cmdlet extension agent with the index 5 has thrown an exception in OnComplete().
The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: ScriptingAgent:
Exception thrown while invoking scriptlet for OnComplete API: You cannot call a method on a
null-valued expression.. ---> System.Management.Automation.RuntimeException:
You cannot call a method on a null-valued expression. at CallSite.Target(Closure , CallSite , Object ) at
System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at
System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame) at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
--- End of inner exception stack trace --- at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e)
at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnCompleteImpl(Task task, Boolean succeeded, Exception exception)
Any assistance in resolving these two issues will be really appreciatedOk I am gonna to answer my own question.
I have persevered through the day and have resolved my two issues. I hope this assist others within the community.
Script:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration version="1.0">
<Feature Name="WelcomeEmail" Cmdlets="New-Mailbox,Enable-Mailbox">
<ApiCall Name="OnComplete">
if($succeeded) {
# Waiting for synchronization after mailbox has been created.
Start-Sleep -s 30
Set-ADServerSettings -ViewEntireForest $true
# New-Mailbox triggered. Taking SamAccountName parameter.
if ($provisioningHandler.UserSpecifiedParameters.Contains("Name") -eq $true) {
$UsrSamAccountName = $provisioningHandler.UserSpecifiedParameters["Name"]
$Usrname = (Get-Mailbox -identity $UsrSamAccountName | Select Name | foreach { $_.Name})
$UsrString = $Usrname | Out-String
$UsrAlias = (Get-Mailbox -Filter {Name -eq $UsrSamAccountName}).Alias.ToString()
# Enable-Mailbox triggered. Taking Identity parameter, this is the only one avalaible in this case.
if ($provisioningHandler.UserSpecifiedParameters.Contains("Identity") -eq $true) {
$UsrIdentity = $provisioningHandler.UserSpecifiedParameters["Identity"].ToString()
$Usrname = (Get-Mailbox -identity $UsrIdentity | Select Name | foreach { $_.Name})
$UsrString = $Usrname | Out-String
$UsrAlias = (Get-Mailbox -Identity $UsrIdentity).Alias.ToString()
# Defining variables.
$UsrAddr = (Get-Mailbox -Filter {Alias -eq $UsrAlias}).PrimarySmtpAddress.ToString()
$UsrOU = (Get-Mailbox -Filter {Alias -eq $UsrAlias}).OrganizationalUnit
# Sending email notification to the user in specific OU.
if ($UsrOU -match "contoso.com") {
# HR #
$fromHR="[email protected]"
$SubjectHR="'Welcome to CONTOSO'"
$BodyHR = [string] (get-content ("c:\welcome\WelcomeMSG.htm"))
$BodyHR = $BodyHR -replace "NewUser00",$UsrString
$fileHR = "c:\welcome\WelcomeMSG.htm"
$smtp="x.x.x.x"
Send-MailMessage -From $fromHR -To $UsrAddr -Subject $SubjectHR -Body $BodyHR -BodyAsHtml -Encoding ([System.Text.Encoding]::UTF8) -SmtpServer $Smtp
# Clearing variables. Each one in its own line in order to prevent error messages from being shown on EMC.
if ($UsrAlias) { Remove-Variable UsrAlias }
if ($UsrAddr) { Remove-Variable UsrAddr }
if ($UsrOU) { Remove-Variable UsrOU }
if ($UsrMsg) { Remove-Variable UsrMsg }
if ($UsrIdentity) { Remove-Variable UsrIdentity }
if ($UsrSamAccountName) { Remove-Variable UsrSamAccountName }
</ApiCall>
</Feature>
</Configuration> -
How to send e-mail alert to the user job is successful or failed.
Hi Experts,
I have scheduled a job using DBMS_JOB Package; in this job I am calling a procedure.
How can we send an e-mail(alert) to the user if the job is successful (or) job fails.
If the job is successfully completed, then we have to send mail as “Job is completed successfully along with job name”.
If the job fails we have to send email as “error message of the job along with job name”(why the job is failed).
This alert should be sending automatically no manual intervention.
Please help me.
CREATE OR REPLACE PROCEDURE APPS_GLOBAL.arc_procedure (P_ID IN NUMBER)
IS
CURSOR C IS SELECT id,table_name,archive_table_name,where_condition
FROM apps_global.control_ram
WHERE id = p_id
ORDER BY id, table_name;
BEGIN
FOR I IN C
LOOP
EXECUTE IMMEDIATE
'INSERT INTO '
|| I.ARCHIVE_TABLE_NAME
|| '
(SELECT * FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| ')';
EXECUTE IMMEDIATE
'DELETE FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| '';
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (
'An error was encountered - ' || SQLCODE || ' -ERROR- ' || SQLERRM);
END arc_procedure;
/This is my job.
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'APPS.arc_procedure(1);'
,next_date => to_date('05/01/2013 00:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'TRUNC(SYSDATE+1)'
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/Thanks in advance.Hi,
I think you can do by creating mailing procedures and call it in the loop and outside the loop.
There would be two procedure one in inside loop which will execute after successfull completion of the loop.
Other would be in the exception block like i shown in the below code you have written;
V_variable_1 you can use as a parameter for what is the error occured.
like suppose your mailing procedure name is Status_email and Status_email_1.
CREATE OR REPLACE PROCEDURE APPS_GLOBAL.arc_procedure (P_ID IN NUMBER)
IS
CURSOR C IS SELECT id,table_name,archive_table_name,where_condition
FROM apps_global.control_ram
WHERE id = p_id
ORDER BY id, table_name;
V_VARIABLE_1 NUMBER;
V_VARIABLE_2 VARCHAR2(400);
BEGIN
FOR I IN C
LOOP
EXECUTE IMMEDIATE
'INSERT INTO '
|| I.ARCHIVE_TABLE_NAME
|| '
(SELECT * FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| ')';
EXECUTE IMMEDIATE
'DELETE FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| '';
COMMIT;
STATUS_EMAIL;
END LOOP;
EXCEPTION OTHERS THEN
V_VARIABLE_1 :=SQLCODE;
V_VARIABLE_2 :=SQLERRM;
ROLLBACK;
STATUS_EMAIL_1(V_VARIABLE_1,V_VARIABLE_2);
END arc_procedure;
/ You can refer to sample email procedure i have created for you.
CREATE OR REPLACE PROCEDURE STATUS_EMAIL
AS
v_From VARCHAR2(80) := 'EMAIL_ID';
v_Recipient VARCHAR2(80) := 'EMAIL_ID';
--YOU CAN SEND EMAIL TO MORE THAT ONE USER SO YOU CAN USE LIKE BELOW VARIABLE....
v_Recipienttt VARCHAR2(80) := 'EMAIL_ID';
v_Subject VARCHAR2(80) := 'SUBJECT_FOR_THE_MAIL';
v_Mail_Host VARCHAR2(30) := 'MAIL_SERVERS_HOST_IP(SMTP_SERVER)';
v_Mail_Conn utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
BEGIN
v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host);
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_Recipienttt);
--OPEN DATA CONNNECTION
UTL_SMTP.OPEN_DATA(v_mail_conn);
--MAIL HEADER
utl_smtp.write_DATA(v_Mail_Conn,'Date: ' || to_char(sysdate, 'DD-MON-YYYY hh:mi:ss AM') || crlf);
utl_smtp.write_DATA(v_Mail_Conn,'From: ' || v_From || crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Subject: '|| v_Subject || ||crlf);
utl_smtp.write_DATA(v_Mail_Conn,'To: ' || v_Recipient || crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Cc: ' || v_Recipienttt ||','|| crlf);
--MAIL BODY
utl_smtp.write_DATA(v_Mail_Conn,'MIME-Version: 1.0'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Content-Type: multipart/mixed;'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,' boundary="-----SECBOUND"'|| crlf ||crlf );
utl_smtp.write_DATA(v_Mail_Conn,'-------SECBOUND'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Content-Type: text/plain;'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Content-Transfer_Encoding: 7bit'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Procedure is successfully complited without error'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Dear All, '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Procedure is successfully complited without error'||'.' ||crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Regards, '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'any_name '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_data(v_Mail_Conn, utl_tcp.CRLF ||'This mail is auto generated.');
--CLOSE CONNECTION
UTL_SMTP.CLOSE_DATA(v_mail_conn);
utl_smtp.Quit(v_mail_conn);
EXCEPTION
WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;
/cheers.. -
The problem is with the new operating system and sending photo via email when used in my iPad.
From photo I selected 3 photos to send via email. I choose the upload key and choose to send by email. Typing text on the email is very slow. This is solved by saving the email as a draft and opening the email again from mail.
Can you amend he system to allow emails to be sent from photo as previously.Have you tried restarting or resetting your iPad?
Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off" -
When i send an email with greek characters in the body, many recipients (not all) cannot read it.
At the same time when i use the internet mail it can be read successfully by the recipient.
I have already checked the encoding settings in the Fonts in order to be "unicode (UTF-8)".
What else can i check?
Thanks in advance.
e.g:
From: Eleni Kontomari [email address removed by moderator Andrew]
Sent: Thursday, February 27, 2014 12:33 PM
To: "Nikos Totsios (Ηλεκτρονική διεύθυνση)"; "Giannis Diokarantos (Ηλεκτρονική διεύθυνση)"; "Dimitris Papadopoulos (Ηλεκτρονική διεύθυνση)"; Vassilis Gounaris; "Vassos Efthymiadis (Ηλεκτρονική διεύθυνση)"; Νικηφόρος Κεκρίδης; Ιωάννης Αθανασόπουλος; "Alexis Katsivas (Ηλεκτρονική διεύθυνση)"; Μιχάλης Παπαοικονόμου; Fomesa Hellas; "Χρήστος Σπηλιάδης (Ηλεκτρονική διεύθυνση)"; Δημήτρης Μπενάκης; "Ν. Γαλάνης"; [email protected]; "Αποστόλης Σαμούδης (Ηλεκτρονική διεύθυνση)"; "Β. Ντουρτόγλου (Ηλεκτρονική διεύθυνση)"; [email protected]; [email protected]; "Φοίβη Λεγάκι (Ηλεκτρονική διεύθυνση)"; "Παναγιώτης Κουμεντάκος (Ηλεκτρονική διεύθυνση)"; Σπύρος Ζαφείρης; Hans- Joachim Henn; "Κώστας Αλεξανδρόπουλος (Ηλεκτρονική διεύθυνση)"; [email protected]; [email protected]
Subject: ΠΡΟΣΚΛΗΣΗ ΤΑΚΤΙΚΗΣ ΓΕΝΙΚΗΣ ΣΥΝΕΛΕΥΣΗΣ ΕΣΥΦ
... 13 2014.
''Please read [[Forum rules and guidelines]] when posting a question in a public forum''There are some language add ons that support emails from other languages that you can check out: [https://addons.mozilla.org/en-us/thunderbird/extensions/language-support/?sort=popular]
The recipient, if they also use thunderbird may need to have a language pack to read the email: [https://addons.mozilla.org/en-US/thunderbird/language-tools/]
You may also need to have them check their interpreter to make sure the email is being received in the same format it is being sent. -
How to send an email with an attachment to the customers email address.
Hi friends,
How to send an email with an attachment to the customers email address.
the attachment will be in doc format.
Having an Header
the data which i am sending must be in a TABLE format
with 5 columns.
and each column must have a column heading
Please guide me.
Thanks in Advance,
Ganesh.*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver .
*Here get the values of mail from the table adn6 for the customer address.
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'
'DOC'
'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
regards,
venkat. -
When I send an email it shows up in the sent folder as new, how do I fix this so it shows it as read automatically?
I don't want all my mail to be marked as read, just the sent messages. I set Thunderbird up on my new PC and whenever I send an email it goes to my sent folder like I want, but it shows up as a new or unread message. I have Thunderbird on my two other PC's and it doesn't act this way. On the other PC's when I send out an email, it shows up in my sent folder as read. That's the way I want it to act on my new PC. With the other two PC's I didn't have to do anything to the setting it was like that from the start.
I appreciate any help I can get in this matter. Thank you -
When trying to send an email, I click address in the "New Message". The "Addresses" screen appears, but it's blank. However, when I click the address book in the tool tray, they're all there. Does anyone have the solution?
Barney,
I have four groups.
I just typed the name of one of those groups in the To field on the iPhone's email, and received:
Invalid Address
"<group name>" does not appear to be a valid email address. Do you want to send it anyway?
I clicked continue and it remains in my outbox.
Help is appreciated.
Thanks,
Michael -
How to send HTML email to End User using OOTB email processs?
Hi,
We are using OOTB Send email process to send email to end user.
Templates has been created inside /etc/workflow/ProjectName/email folder.
Its working properly for plain text email.but for html template ,It send the email with html tags.
Any pointer on how to write html template for OOTB email process and activate email type as html ?
Thanks
DeepikaThanks Sham..
I am able to send HTML email following above link.
The problem i am facing is,When i am deploying the code through crxde.Code is working fine.
But using maven deploy..Bundle get activated ..But at line:
messageGateway = this.messageGatewayService.getGateway(HtmlEmail.class);
,it gives null Pointer exception.
Any pointer,why its not working from maven deployment.
Regards
Deepika -
How can I make a survey automatically identify the user in the results?
How can I make a survey automatically identify the user in the results (so that it won't be anonymous)?
I am not sure what information to provide. Here is what I am trying to do. I am trying to create an HR questionnaire with multiple choice questions and several multiline textboxes to capture comments. I want to send it out by email address and/or embed the questionnaire somewhere on the company's intranet website. But we don't want the questionnaire to be anonymous. If someone makes a particular comment, we want to be able to communicate with the person who made that particular comment. How would we be able to trace the person? By email address, or by user ID?
-
How to send one email to multi-users using JavaMail ?
I am using JavaMail API. I am working in "sending emails to users", I had already tested "one email to one user" and got success but when tried to send one email to multi-users then I failed to do that?
Can anyone help me to do this?
I have used the below code to send to multi-user:
Address[] toAddr = {new InternetAddress(_to),new InternetAddress (to2)};
msg.addRecipients(Message.RecipientType.TO, toAddr);
But it is static only 2 users. I want to send to multi-users dynamically taking datas from database.
I have tried by using below code but it doesn't work.....
InternetAddress[] emails;
while (resultset.next()) {
temp = resultset.getString(1);
emails.setAddress(temp);
i++;
Address[] toAddr = emails;
msg.addRecipients(Message.RecipientType.TO, toAddr);
Thank you in advance...
-riteshI think you're confused about some basic Java programming techniques.
There are two obvious ways to do this.
1. Call the addRecipient method in a loop.
2. Collect all the recipients in a List, convert it to an array, and call addRecipients. -
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 an email to all user in Oracle Test Manager for Web Applications
I have administrator access to Oracle Test Manager for Web Applications. How can I send email to all user in the system (Oracle Test Manager for Web Applications)?
Thanks
Katherine
Edited by: Katherine on 20/12/2010 16:38
Edited by: Katherine on 20/12/2010 16:39Hi ,
You can create a single dynamic distribution group with the condition to have only the mailboxes in exchange as its members . Then when a person send an email to that Dynamic distribution group it will get distributed to all the mailboxes
in exchange.
Note : Most important feature in the dynamic group is that the membership of that group will be maintained automatically and also along with that we can have group membership by defining the recipient types/OU /rules.
I agree with ED and also based on my knowledge you cannot achieve your scenario without Distribution groups or dynamic distribution groups.
Thanks & Regards S.Nithyanandham -
FM to SEND an email to SAP USER
Hi Gurus,
Pls let me know the FM if any to send a email to SAP USER (eg. DANYGG) so that it will go to SAP INBOX of the user in T.code So01.
Promise to reward.
Regards
Machi,
check with this code, and reward if u find useful..
Table Declarations
TABLES: SOLI.
Data Declarations
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: SAPID RADIOBUTTON GROUP ADDR,
EMAIL_ID RADIOBUTTON GROUP ADDR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
*PARAMETERS: SENDER LIKE SOUD-USRNAM.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
PARAMETERS: SUB_LINE(60) TYPE C.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
SELECT-OPTIONS: TEXT1 FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT-009.
SELECTION-SCREEN BEGIN OF LINE.
parameters: P_ATTACH as checkbox.
selection-screen comment 3(30) text-010.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B5.
DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
SUBJECT_LINE LIKE SOOD1-OBJDES.
Start of program processing
START-OF-SELECTION.
Get the Body of the Message from the selection screen or from
calling program
LOOP AT TEXT1.
MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
ENDLOOP.
Subject of the Message
MOVE SUB_LINE TO SUBJECT_LINE.
call a routine to send the workflow message
PERFORM SEND_EMAIL
TABLES MAIL_CONTENT
USING SUBJECT_LINE.
*& Form SEND_EMAIL
Send Workflow message
FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
USING TITLE LIKE SOOD-OBJDES.
DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
TSOOD1 LIKE SOOD1,
PACKING_LIST LIKE SOXPL OCCURS 0 WITH HEADER LINE,
OBJCONT1 LIKE MAIL_CONTENT OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF AT_HEADER OCCURS 1.
INCLUDE STRUCTURE SOLI.
DATA: END OF AT_HEADER.
CLEAR: TSOOD1,
RECEIVERS.
REFRESH RECEIVERS.
MOVE: SY-LANGU TO TSOOD1-OBJLA,
'Email Notice' TO TSOOD1-OBJNAM,
'C' TO TSOOD1-OBJSNS,
TITLE TO TSOOD1-OBJDES.
'SCHIAVONIR' TO TSOOD1-OWNNAM.
loop through each ID and move them to recipient table
LOOP AT ID.
TRANSLATE ID-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
ID-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
ID-LOW TO RECEIVERS-RECEXTNAM.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each CC and move them to recipient table
LOOP AT CC.
TRANSLATE CC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
CC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDCP.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
CC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDCP.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
loop through each BCC and move them to recipient table
LOOP AT BCC.
TRANSLATE BCC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
BCC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDBC.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
BCC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDBC.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
AT_HEADER = SY-DATUM.
APPEND AT_HEADER.
AT_HEADER = SY-UZEIT.
APPEND AT_HEADER.
IF SENDER EQ SPACE.
SENDER = SY-UNAME.
ENDIF.
IF P_ATTACH EQ 'X'.
PACKING_LIST-HEAD_START = 1.
PACKING_LIST-HEAD_NUM = 2.
PACKING_LIST-BODY_START = 1.
PACKING_LIST-BODY_NUM = 9999.
PACKING_LIST-FILE_EXT = 'TXT'.
APPEND PACKING_LIST.
CLEAR PACKING_LIST.
APPEND LINES OF OBJCONT TO OBJCONT1.
REFRESH OBJCONT.
ENDIF.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = TSOOD1
OBJECT_TYPE = 'RAW'
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
ATT_HEAD = AT_HEADER
ATT_CONT = OBJCONT1
PACKING_LIST = PACKING_LIST
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
ENDFORM. " SEND_EMAIL
regards
dinesh -
How to find out the user from the Jobs queue in Report server
Hello All!
I have a doubt about finding out the user from the scheduled jobs queue. Say I go ahead and schedule a report on Reports Server how can I find out the user name. When I view the jobs using showjobs I could see that the DBMS_JOBS table has a column under "Job Owner". But it invariantly shows it is "rwuser". So is there a way to find out which user has scheduled which job?
Regards
Shobhahi,
The below tables will give only the name .
USER_ADDRS
USER_ADDR
USER_ADDRP
USR02
i think you need email address .
you can use this Tcode : su01d
and give the user name and excute it
i hope it will help you.
Ram
Edited by: Ram velanati on Jun 30, 2008 6:57 PM
Maybe you are looking for
-
Devices no longer sync mailbox for specific user
I have an Exchange 2010 environment running ActiveSync. We have started to enroll devices using Xenmobile which pushes out a mailbox configuration for the users to connect to their mailbox. Everything is working fine with the exception of one user so
-
Previous value of same variable
How can I compare previous value of same variable(result) with current value. Example, result 1 > result 2 or not, result 2 > result 3 or not, result 3 > result 4 or not, result 4 > result 5 or not. import java.util.Random; public class Test { public
-
Hi there, Got a small problem the output's are coming out like this 155.5 and i need them to come put like this 155.50 <cfparam name="FORM.twin" type="string" default="1" /> <cfquery name="twin" datasource="strand"> SELECT * FROM hotel_rooms WHERE ho
-
Mpeg2 files converted to DV files..how do I "share" with iDVD for burning?
Newbie question here...thanks for all the great info I have found here already...but need some more. I'm using an iMac with OS X 10.4.7, QT Pro, downloaded MPEG StreamClip, and purchased MPEG Playback as suggested on this board. Here's the situation:
-
Is there a way to remove packages that are installed as dependencies?
Hi, I recently tried out GDM, and found that I don't like it. I now wish to remove it, along with all the dependencies that were installed along with it. However, I cannot find a way to list the dependencies of GDM, so that I can remove those as well