CL_BCS does not send a sent request - abap

I was trying to send email and send request but only the email was sent(SBWP). I'm expecting to receive a send request in transaction SOSA.
SELECT-OPTIONS:
s_inbox FOR bname NO INTERVALS, "SAP ID
s_email FOR bname NO INTERVALS. "External Email
SELECTION-SCREEN END OF BLOCK b1.
*Code for sending the email to list of users. LIKE CC/BCC in email. Users listed under the S_INBOX were able to receive an email in the workplace inbox in SBWP.
LOOP AT s_inbox[] ASSIGNING FIELD-SYMBOL(<s_inbox>).
lo_sender = cl_sapuser_bcs=>create( <s_inbox>-low ).
lo_send_request->add_recipient( lo_sender ).
ENDLOOP.
*Code for sending an outbound send request in transaction code SOSA. User or users under this list s_email were not able to receive an email or outbound send request in SOSA.
LOOP AT s_email[] ASSIGNING FIELD-SYMBOL(<s_email>).
lo_recipient = cl_sapuser_bcs=>create( <s_email>-low ).
lo_send_request->add_recipient( lo_recipient ).
ENDLOOP.
INBOX IS S_INBOX
EMAIL IS S_EMAIL
When the program is executed, there should be a send request received here. If it was sent today 16/08/2022, there should be a send request here but there was none.

Related

Exim replace empty Subject

How to add "(No Subject)" automatically in emails sending with the subject is empty. My external smtp require a subject to send e-mails and display the error in this case:
SMTP<< 5.2.1 Subject is Mandatory

How to send SQL script results as a table in email body via Automic

I have a workflow which looks like below.
The first task of this workflow runs a simple select * query and the next one sends an email. They are working fine individually. What I want is to send the output of the SQL task as an input to the email task so that it can be attached to the email being sent.
I have tried to manually enter the runId of the SQL task in below field of notification object and it works as expected. But how to make this field take dynamic value from its predecessor instead of a hardcoded one?
Also, is there a way I can include the output of the select * in the email body as a table ?
Update --1
I was able to get a hold of runId of preceding task via the below script. Now only need help with including it in the mail body as opposed to attachement.
:SET &NR# = SYS_ACT_PREV_NR()
:PRINT "RunID of the previous task is &NR#."
Firstly;
Setup
The package is loaded by running the following scripts.
sys/passwordord AS SYSDBA
#$ORACLE_HOME/rdbms/admin/utlmail.sql
#$ORACLE_HOME/rdbms/admin/prvtmail.plb
In addition the SMTP_OUT_SERVER parameter must be set to identify the SMTP server.
CONN sys/password AS SYSDBA
ALTER SYSTEM SET smtp_out_server='smtp.domain.com' SCOPE=SPFILE;
-- Instance restart only necessary in 10gR1.
SHUTDOWN IMMEDIATE
STARTUP
I would suggest you use a mail relay on the database server, rather than connecting directly to an external mail server. The mail relay configuration can be simple, with a reference to "localhost" in the SMTP_OUT_SERVER parameter. Any complexities about connecting to your external mail server are then hidden in the mail relay configuration.
Send Emails
With the configuration complete we can now send a mail using the SEND procedure. It accepts the following parameters.
SENDER : This should be a valid email address.
RECIPIENTS : A comma-separated list of email addresses.
CC : An optional comma-separated list of email addresses.
BCC : An optional comma-separated list of email addresses.
SUBJECT : The subject line for the email.
MESSAGE : The email body.
MIME_TYPE : Set to 'text/plain; charset=us-ascii' by default.
PRIORITY : (1-5) Set to 3 by default.
REPLYTO : Introduced in 11gR2. A valid email address.
Below is an example of the usage.
BEGIN
UTL_MAIL.send(sender => 'me#domain.com',
recipients => 'person1#domain.com,person2#domain.com',
cc => 'person3#domain.com',
bcc => 'myboss#domain.com',
subject => 'UTL_MAIL Test',
message => 'If you get this message it worked!');
END;
/
Send Emails with Attachments
The package also supports sending mails with RAW and VARCHAR2 attachments using the SEND_ATTACH_RAW and SEND_ATTACH_VARCHAR2 packages respectively. They work in a similar fashion to the SEND procedure, with a few extra parameters.
ATTACHMENT : The contents of the attachment. This should be VARCHAR2 or RAW depending on which procedure you call.
ATT_INLINE : Indicates if the attachment should be readable inline. Default FALSE.
ATT_MIME_TYPE : The default is 'text/plain; charset=us-ascii'.
ATT_FILENAME : The name for the attachment.
Below is an example of sending an email with a text attachment.
BEGIN
UTL_MAIL.send_attach_varchar2 (
sender => 'me#domain.com',
recipients => 'person1#domain.com,person2#domain.com',
cc => 'person3#domain.com',
bcc => 'myboss#domain.com',
subject => 'UTL_MAIL Test',
message => 'If you get this message it worked!',
attachment => 'The is the contents of the attachment.',
att_filename => 'my_attachment.txt'
);
END;
/

How to send email "from" customer's email using SES

I am a beginner developing my first site and I'm using AWS as my hosting platform. On my site I have a Contact Us form where the user can input their name, email and message then hit submit.
I am using SES to send the email from the Contact Us form, but I have a problem. I am aware that SES can only send emails from a verified email address, however I would like to set my From header to be the email address entered by the customer. This is so that when the mail arrives in my mail client it shows the customer's name on the left, next to the subject, before I click into the email.
I tried setting the Sender header to my verified email so that I could use the From header as the customer's one, but it made no difference.
I have been following this guide but as soon as I change <sender#example.com> to anything other than my verified email address it won't work.
The bash script which I'm using to send the email looks like this:
emailInput='AUTH LOGIN
*myBase64EncodedSMTPLogin*
*myBase64EncodedSMTPPassword*
MAIL FROM: '"${1}"'
RCPT TO: *my ses verified email address*
DATA
From: '"${2}"' <'"${1}"'>
To:
Subject: Message from *mysite.com*
'"${3}"'
.
QUIT'
echo "$emailInput" > ./tmpEmailInput.txt
openssl s_client -crlf -quiet -starttls smtp -connect *aws smtp endpoint* < tmpEmailInput.txt
rm ./tmpEmailInput.txt
In the above code, the arguments are as follows:
The first argument is the customer's email address.
The second is their name.
The third is their message.
If I change $1 in both places to my verified email address it works, but then in my mail client is says "me" as the sender, because the verified email address is both sending and receiving. I can only see the customer's name in the field at the top once I click into the email.
I would greatly appreciate some advice.
Thank you.

ItemId not valid after email sent

This SO question answers part of my question - when I save an email I can retrieve its ItemId but as soon as it's sent the ItemId is invalid and a request to to the Outlook rest api to retrieve the email returns a 404.
My question then is how do I subsequently identify the email I just sent if the ItemId is different?
You can stamp the message with your own custom property - it will be preserved when the message is moved to the Sent Items folder. You will be able to search on that property.

Why I can't send sticker by it's id

I want my bot to send special sticker. I got it ID in logs after sending it to bot.
file_id "CAADAgADOQADfyesDlKEqOOd72VKAg"
This is what getUpdates give me
But if I try to send it, for example:
https://api.telegram.org/bot<token>/sendSticker?chat_id=<id>&file_id=CAADAgADOQADfyesDlKEqOOd72VKAg
It responds"Bad Request: there is no sticker in the request". This is the code and it obviously does nothing:
def stickinmyass(bot, update):
bot.send_sticker(chat_id=update.message.chat_id, file_id='CAADAgADOQADfyesDlKEqOOd72VKAg')
stickyass = MessageHandler(Filters.sticker, stickinmyass)
dispatcher.add_handler(stickyass)
j = updater.job_queue
The file_id needs to be passed as the sticker parameter for the sendSticker method.
https://api.telegram.org/bot<token>/sendSticker?chat_id=<id>&sticker=CAADAgADOQADfyesDlKEqOOd72VKAg
or
bot.send_sticker(chat_id=update.message.chat_id, sticker='CAADAgADOQADfyesDlKEqOOd72VKAg')