- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi WeylandSwart,
Could you let me know a little bit more about how you're sending email? For example, are you creating and sending email entirely through the Pinpoint console? Or are you using the Pinpoint API or an AWS SDK to send emails?
Thanks,
Brent @ AWS
Hey Brent
I'm using the console for now. I thought that there would be like-for-like functionality across the API and SDK. I'm happy to use whatever is necessary. I just feel a bit dumb for not having been able to find this one small thing in any of the documentation yet. Hoping you can point me in the right directio
Thanks for the help!
Hello,
Just to make sure we're on the same page here, when I say "console," I mean the web-based Pinpoint console at https://console.aws.amazon.com/pinpoint. Just clarifying this point because I know it's common to use "console" to refer to a command-line interface rather than a graphical one.
So, if you're using the web-based Pinpoint console, you unfortunately can't specify the display name (also known as the "friendly from" name). I think this ability should definitely be added to the console, so I've submitted a feature request to our Product Management team.
On the other hand, if you're sending email programmatically (such as by using an AWS SDK), you can definitely specify the display name. For the sender, just use the following format:
Sender Name <sender@example.com
>```
For example, here's a quick Python script that shows how to send an email with a display name by using the AWS SDK for Python. Just replace the variables with your own values, and you're ready to go.
import boto3 from botocore.exceptions import ClientError
SENDER = "Mary Major mary@example.com" TOADDRESS = "mary@example.com" CHARSET = "UTF-8" AWS_REGION = "us-east-1" APPID = "01234567890123456789012345678901"
Create a new client and specify a region.
client = boto3.client('pinpoint',region_name=AWS_REGION) try: response = client.send_messages( ApplicationId=APPID, MessageRequest={ 'Addresses': { TOADDRESS: { 'ChannelType': 'EMAIL' } }, 'MessageConfiguration': { 'EmailMessage': { 'FromAddress': SENDER, 'SimpleEmail': { 'Subject': { 'Charset': CHARSET, 'Data': "This is a test" }, 'HtmlPart': { 'Charset': CHARSET, 'Data': '<h1>Test email</h1><p>This is a test.</p>' }, 'TextPart': { 'Charset': CHARSET, 'Data': 'This is a test.' } } } } } ) except ClientError as e: print(e.response['Error']['Message']) else: print("Message sent! Message ID: " + response['MessageResponse']['Result'][TOADDRESS]['MessageId'])
You can specify the display name in exactly the same way in all of the other SDKs. This same method also works if you use the Pinpoint SMTP interface to send email.
Let me know if there's anything else I can do to help.
Thanks!
Brent
Thanks for providing that solution, Brent. It works exactly as expected (Obviously). It would be great to have the functionality embedded into the Pinpoint console itself as it is much more accessible to newer users like myself.
Thanks again for the assistance!
Weyland.
+1
Completely agree that a friendly "from name" should be made part of the standard project setup. It seems like a glaringly obvious oversight. Please fix without requiring programming.
Message Configuration object i specified when we are creating a new email message. What if I am creating a campaign with an existing template. Then there's the template configuration , but it doesn't have the option to include from address. PLease help me with that
Hi Brent!
Breathing new life into this thread since this is one of the first search hits on Google.
Since May 2019 AWS Pinpoint has now implemented the option to set "Friendly sender name" in the web console/interface. For newbs like myself that want to continue using the web interface this is great. Unfortunately it seems like the interface doesn't handle characters like åäö ÅÄÖ (Swedish) or other similar characters with umlauts or accents. Since this is handled well in other parts of the Pinpoint web console it would make sense to be able to use them here as well. Can this be fixed?
Thanks
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans