Sending an email to an email GROUP in Oracle PL/SQL - oracle

I'm trying to send an email to email addresses in a mailing group with the package and procedure below.
xxfr_mail_package.begin_mail ( sender => '<MEKSICO-IYE<noreply#meksico.com>',
recipients => fnd_profile.value('XXPC_PLANNING_MAIL'),
subject => l_subject,
mime_type => 'text/html; charset=iso-8859-9',
priority => '',
cc => l_cc );
fnd_profile.value('XXPC_PLANNING_MAIL') returns email addresses separated by semicolons. In this case, sending emails to each address is seamless.
However, when a group e-mail is given as an argument to the recipients parameter, no e-mail is sent to the e-mail addresses in the group. Since the list of recipients is long, I want to use an email group as an argument.
Is there a solution to this?

The problem has been solved by removing restriction on the distribution list on the Exchange Server side. Thanks for your valuable responses.

Related

Optional recipient role template docusign

I created a template by the UI, and use it to create envelopes through the rest API. So far so good.
In the template, 4 roles were created. But one of these should be optional when creating the envelope, that is, in certain envelopes there will only be 3 signers.
The problem is that if I only send information for 3 templatesroles the docusign returns an error of INVALID_EMAIL_ADDRESS_FOR_RECIPIENT, for the role that was not informed.
My question is if there is a way to create a "optional" role in template. Which will only be informed in some envelopes.
Edit:
I'm creating the envelope with the status "created". I do that bc we have to add some documents to the envelope before sending. After that I update the envelope changing the status to "sent".
The error happens when I update the status to "sent". If I create the envelope already with the "sent" status the error doesn't happens.
Here's my code:
$result = Docusign::createEnvelope(array(
'templateId' => $saleContract->obra->template_id,
'emailSubject' => 'Contrato de Compra - ' . $saleContract->obra->nome_fantasia,
'status' => 'created',
'templateRoles' => $this->getRoles($saleContract, $tabs),
));
$this->addDocuments($saleContract, $result['envelopeId']);
//HERE IS WHERE THE ERROR HAPPENS
Docusign::updateEnvelope($result['envelopeId'], ['status' => 'sent']);
By default, template roles are optional. This means that you can successfully do the following:
Create a single template that contains the maximum number of recipients (and fields/tabs for all recipients).
Each time you create an Envelope via API, include Recipient information in the "Create Envelope" API request only for the needed recipients (Roles).
Any Recipient Roles that you do not specify information for when you POST /envelopes will not be included. In the event you want to create your envelope in draft, make modifications, and then send, set the "merge roles on draft" qp to true.
merge_roles_on_draft string
When set to true, template roles will be merged, and empty recipients will be removed. This parameter applies when you create a draft envelope with multiple templates. (To create a draft envelope, the status field is set to created.)
If you're still having problems, double-check that you haven't prepopulated your template role with name or email values. That will fudge up the merge ^

Microsoft graph API - empty bccRecipients list

This is the Scenario:
In the same Azure tenant, I used one account (user_1_address) to send emails to the other account (user_2_address) using outlook (o365).
I sent 3 emails, one where user_2_address is BCCed, one CCed, and one when it's the TO recipient.
I'm using Microsoft graph API to get a list of emails received by user_2_address in a specific time range, using this query:
https://graph.microsoft.com/v1.0/users/{<user_2_id>}/messages?$filter=
receivedDateTime ge <some date> and receivedDateTime lt <some other date>
and isDraft eq false
and sender/emailAddress/address ne '<user_2_address>'
I'm getting all the three emails user_2_address had received from user_1_address. But in the email user_2 was BCCed the bccRecipients list is empty, when it should contain user_2_address :(
I have seen this question about sending an email from Gmail and BCC an outlook user:
Microsoft graph API: empty BCC field
In that case, also the bccRecipients list was empty, but it was resolved by saying the BCC is removed when sending the emails from an external source (Gmail in that case). When for me it's not an external source - both users are using outlook in the same tenant.
So my questions are:
Is it the desired behaviour, or is it a bug?
Now, let's say I'm using the query above where I get all emails where the sender is not the user_2_address and it's not a draft. Can I assume that every email I get where user_2_address is not in the ccRecipients and toRecipients lists - that email was BCCed to user_2_address?
Thanks!
The bcc field in a Message is an envelope (P1) recipient only so you should always expect that it will be blank (no matter the context inside a tenant really make no difference). Like the other post referenced if it wasn't blank it would break the RFC and the purpose of a BCC, the only exception is the sent item (which is just a copy of the sent message)
No there are many scenarios that would break that particular logic eg forwarded email is one the comes to mind. You could certainly refine you result set that way, one thing you might want to examine is the X-MS-Exchange-Organization-Recipient-P2-Type: mail header that should get set in your internal to internal scenario (you need to look at the PidTagTransportMessageHeaders extended property to see it)

Transmission api setting wrong To header when specify header_to with multiple recipients

I'm trying to send an email to multiple people(multiple to addresses) and have them all listed in the email clients like a regular email. When I set the header_to field on all recipients to email1#foo.com, email2#foo.com I end up with emails that have a to header set to "First Name" <email1#foo.com, email2#foo.com> which is incorrect.
This shows up as a single person with multiple email addresses in most clients and the header is wrong.
Why is the sparkpost transmission api messing with the header_to field? It's docs say that it uses this in place of generating a To header for you.
After going through every page of docs I could find to try and figure out how sparkpost's backend works I've found that you must omit the Name field on all recipients.
https://developers.sparkpost.com/api/recipient-lists/#header-recipient-object

Change "from" field of SMS text message for recipient

I want the recipient of my SMS text message to see the name of my business, rather than the phone number. How is this possible? I am currently using Twilio, but I am open to suggestions involving other services.
For those of you who have looked at #philnash s answer and still having problems, please read this. I'm using the twilio-ruby gem, and am in the UK.
I see a lot of places state that:
all you need to do is replace the from parameter.
This is not true!
Step 1
Contact Twilio and have them enabled it on your account.
Step 2
The second step is to make sure that to number you are using has the correct country code, 0779XXXXXXX and 779XXXXXXX are enough to send a text message when specifying a from number that has been previously purchased. The purchased number has a country of origin and therefore Twilio know to prefix it with the correct country code. However, an alphanumeric sender has no from number, and therefore no country of origin.
Using 0779XXXXXXX as the To param. Returns the error:
The 'To' number 0779XXXXXXX is not a valid phone number.
While technically correct, it isn't incorrect, it's just missing the country code.
Using 779XXXXXXX as the To param. Returns this error: The 'To' phone number: +1779XXXXXXX, is not currently reachable using the 'From' phone number: Foo via SMS. +1 is the USA phone prefix. The USA doesn't have an option to send as alphanumeric. This is how I stumbled onto the fix.
TLDR;
1. Contact Twilio to get them to enable it on your account
2. Make sure you prefix with the country code.
I have found three services (not Twilio) that appear to address the question:
Nexmo
Plivo
smsmessagesender
The above services support dynamic alphanumeric sender ID for outbound SMS, so you should be able to send a combination of 11 alpha-numeric characters as the sender ID of your message. Note the emphasis on outbound SMS. It appears that receiving incoming SMS on an alphanumeric sender ID is not possible.
If anyone has more experience with these services, please share.
Edit: Note that the availability of these services also depends on the laws of the jurisdiction where the services are to be used.
Twilio developer evangelist here.
I know this is a good few months since you asked this, but I wanted to update the possible answers for completeness. When you asked this in November 2014 it was not possible to send SMS messages from Twilio using an alphanumeric sender ID.
However, since May 2015 it has been possible to do so. All you need to do is replace the phone number as the From parameter of the API call to send a message with the text you want the sender ID to be. This currently works when sending SMS messages to 145 countries.
If I was doing this in Ruby, it would look like:
account_sid = YOUR_TWILIO_ACCOUNT_SID
auth_token = YOUR_TWILIO_AUTH_TOKEN
recipient_phone_number = RECIPIENT_PHONE_NUMBER
client = Twilio::REST::Client.new(account_sid, auth_token)
client.messages.create(
from: "ALPHANUMERICID",
to: recipient_phone_number,
body: "Hello World!"
)
Edit
Please note, that to use alphanumeric sender IDs on your Twilio account you need to have your account enabled. To do so, please contact twilio support with your account SID to request access.
As FullStack said, you can consider using another SMS API for this.
Nexmo, where I work, offers a high quality messaging service including the support of dynamic sender id. You can use any alphanumeric string to describe your application or brand where supported by carriers (where there are no restrictions on alphanumeric sender ids).
Some countries, such as the United States, don't allow alphanumeric sender ids. Other countries allow it, but have special restrictions that we take into account & work around to ensure maximum delivery.
You can find the full list of alpha-numeric sender ID compatible countries, along with carrier restrictions, here.
<?php
$url = 'https://rest.nexmo.com/sms/json?' . http_build_query([
'api_key' => API_KEY,
'api_secret' => API_SECRET,
'to' => YOUR_NUMBER,
'from' => "AppName",
'text' => 'Hello'
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Ruby Net::SMTP - Send email with bcc: recipients

I would like to use Ruby Net::SMTP to send email. The routine
send_message( msgstr, from_addr, *to_addrs )
works well in my code for sending email, but it is not clear from this API how to send email to a list of people that need to be blind copied (bcc:).
Am I missing something, or is it just not possible with Net::SMTP?
The to_addrs parameter of send_message specifies the envelope to addresses. Including an address in to_addrs has no effect on the to and cc addresses that get included in the message header.
To bcc a recipient, include the address in the to_addrs parameter, but don't include it in the headers in msgstr. For example:
msgstr = <<EOF
From: from#example.org
To: to#example.org
Cc: cc#example.org
Subject: Test BCC
This is a test message.
EOF
Net::SMTP.start(smtp_server, 25) do |smtp|
smtp.send_message msgstr, 'from#example.org',
'to#example.org', 'cc#example.org', 'bcc#example.org'
end
This will send an email to three recipients: to#example.org, cc#example.org and bcc#example.org. Only to#example.org and cc#example.org will be visible in the received message.
Yes it's not possible easily with Net::STMP. But there are a really great gem to manage your email sending (http://github.com/mikel/mail). I encourage you to use it.

Resources