I am using System::Net::Mail to send emails.
I was questioned about is it able to send two versions of email:
1) the html version of email for clients that can read html emails
2) text/plain for people who can't read html emails, and also the html version will be attached
is this possible using System::Net::Mail? I know how to enable HTML body version, but, how to send to types of message?
Thanks!
To let the recipient decide which version she wants to read, the mail needs to be composed using the multipart/alternative MIME type. System.Net.Mail supports this by means of the System.Net.Mail.MailMessage.AlternateViews collection.
Related
Using Plugin Registration, I registered webhook, Power automate and sample webhook as well.
Json (Remote execution context) sent to webhook seems to be fine but when German characters appears in field values, it sends as rubbish.
I tried adding httpheader to webhook as Content-type: application/json; charset=utf-8 or Accept-Charset: utf-8
but this did not helped.
Did anyone previously faced similar issue?
I suspect there is bug from Dynamics-crm side especially plugin registration tool, but I might be wrong.
You can use IServiceEndpointNotificationService to encode the content before sending or alternatively what you can do is creating an Azure Function that you will invoke on your Webhook and inside the function you should encode the content to UTF-8 and make a second call to you final endpoint, you can do there also further transformation of data if needed.
I am trying to simulate email from a secure email account using Jmeter.
Any attachments that I send are not being encrypted using Base64 as the emails are when sent from the same email address manually. this is causing a problem whereby the application that picks up the attachment to process fails to decode the email.
How can I get Jmeter to submit the email with attachment with content-transfer-encoding of base64?
If all you need to do is to perform base64-encoding of the message body - you can perform it via __base64Encode() function available via Custom JMeter Functions bundle and can be installed using JMeter Plugins Manager.
However be aware that it can be easily decoded back even using online tools so I doubt that it makes sense to rely on Base64 for security.
You can always call underlying Java Mail API functions from JSR223 Test Elements if JMeter cannot fully fulfill your requirements.
we are trying to implement the SMS function from Twilio to our 4D application. The phone number, SID, AuthKey and all required information I use in the tool of SOAPUI show me everything is working fine and I have received an SMS from Twilio. However, when I try to implement using the 4D platform, I have tried to use JSON to pass the From, To and Body as a request and the response come back say "A from phone number is required" Please see screenshot attached and I wanna know what I did wrong.
Succeed from SoapUI
Implement from 4D
Twilio developer evangelist here.
I don't personally know either SoapUI or 4D. But here's what I can see from your screenshots.
In SoapUI, you have the request Content-Type header set as application/x-www-form-urlencoded and it looks as though you are sending the body as form encoded parameters and that is why you get the correct response.
In 4D I can see you set the same header as application/x-www-form-urlencoded, but you then send the data as JSON. Twilio only accepts data in POST requests as form encoded key value pairs. As I don't know 4D, I can't tell you exactly how to fix it, but you do need to stop JSON encoding the data and send as form data instead.
Let me know if this helps.
I'm working on a support app which would allow customers to mail to support#myapp.com and reply to this same email address. I have set up ticket+[id]#myapp.com to be visible within the support team whenever there's a new ticket created. I am using Cloudmailin for the incoming emails and SendGrid for outgoing.
I want to be able to store the ticket ID in the email headers of the email that is sent to the customer from support#myapp.com. When the customer replies to support#myapp.com, the app will then read the headers and know which ticket ID to route to. I have read up that it is not recommended to include X-custom headers as it would get stripped off by some mail servers.
There are some suggestions to use the Reply-To header to store the ticket ID but I can't seem to find that header in Cloudmailin.
Appreciate any suggestion on this matter.
I think you have the right idea in using the +'s to differentiate the emails. To read the incoming email header, you can use the headers[to] in cloudmailin.
Message Sender <sender#example.com>
------cloudmailinboundry
Content-Disposition: form-data; name="headers[To]"
Cloudmailin headers file
As I am not able to find a way to set the content-type to JSON for the data I sent via XDomainRequest,
I naturally ask:
Is it IMPOSSIBLE to POST JSON with XDomainRequest?
"Only text/plain is supported for the request's Content-Type header"
Looking at some other questions, I'd say this is possible.
For example: How to send JSON data in XDR using the POST method
You can still POST the JSON as plain text and have the server side read the POST body directly and handle it, even Content-Type is missing for the sick of IE.
According to http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
You cannot send content-type : application/json in xdr. You can not even send any other custom header.
xdr is only limited to text/plain
The best you can do is use JSON.stringify() and parse it on server side.
xhr.send(JSON.stringify(jsonObject))