I want to change the encoding of the message returned from RETR command in POP3.
I get this header in the reply:
Content-type: text/html; CHARSET=WINDOWS-1255
I want to change it to:
Content-type: text/html; CHARSET=UTF-*
Thank you very much. Sorry about my English...
You can't. The POP3 server knows nothing about the encoding of the message - it just stores the message (exactly how it got it) and then hands it over to the client. In fact - theoretically you could retrieve something via POP3, that isn't an email at all.
The encoding of the message is generated at the sending side, not the receiving side.
Related
How I did understand, message/delivery-status is a mime type of message part,
which contains the data formatted for the mail server to read (Wiki)
Does it mean that I can ignore it while receiving message from mail server? If not, could you give more explanation of present mime type.
How should I parse it and do I need to present it to user?
I found it on official specifications https://www.rfc-editor.org/rfc/rfc3464#section-2.1
We send out password-reset emails to business partners who use our intranet. The body of the email contains a hyperlink:
`http://www.ourdomain.com/ResetPassword.aspx?token=....`
But some of the people who receive these emails are saying there's an extra dot in the domain name:
`http://www.ourdomain..com/ResetPassword.aspx?token=....`
I do not see where that could be happening in the program I've written. I store the base url in the web.config:
`http://www.ourdomain.com`
and attach the name of the aspx page and append the token to it.
Are there any corporate anti-virus programs out there which deliberately mangle hyperlinks discovered in the body of emails, to render them invalid and thus unclickable?
This seems to be per the spec of quoted-printable encoding. It just so happens that the length of text in the message breaks to a new line right at the .com (72 characters maybe?). Please verify that this is the case by sending yourself a message and analyzing the quoted-printable source of the message.
System.Net.Mail creating invalid emails and eml files? Inserting extra dots in host names
The solution would be to not use quoted-printable encoding if some email programs cannot correctly interpret the spec.
plainText.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;
//or base64
I have written the following two methods for sending requests for signatures.
From template: https://github.com/wadewegner/docusign-sample/blob/master/src/DocuSign/DocuSignClient.cs#L215
From binary: https://github.com/wadewegner/docusign-sample/blob/master/src/DocuSign/DocuSignClient.cs#L152
Both work great and I can see they are out for signature:
The trouble is receiving the email requesting the signature is spotty at best. Early on in my testing it seemed I'd (mostly) get the email, but a couple days in and I haven't received any of the emails you see in the image above.
I'm using a developer sandbox. Is there some kind of restriction?
Also, it seems sending to a different email address from the one I registered is particularly problematic. Are there even more restrictions?
Thank you!
Edit: adding additional info requested.
REQUEST #1 (posting document):
POST https://demo.docusign.net/restapi/v2/accounts/892965/envelopes HTTP/1.1
X-DocuSign-Authentication: <DocuSignCredentials>...</DocuSignCredentials>
Accept: application/json
Content-Type: multipart/form-data; boundary="BOUNDARY"
Host: demo.docusign.net
Content-Length: 91206
Expect: 100-continue
--BOUNDARY
Content-Type: application/xml; charset=utf-8
Content-Disposition: form-data
<envelopeDefinition xmlns="http://www.docusign.com/restapi"><emailSubject>DocuSign API - Signature Request on Document</emailSubject><status>sent</status><documents><document><documentId>1</documentId><name>test.pdf</name></document></documents><recipients><signers><signer><recipientId>1</recipientId><email>wade.wegner#gmail.com</email><name>Wade Wegner</name><tabs><signHereTabs><signHere><xPosition>100</xPosition><yPosition>100</yPosition><documentId>1</documentId><pageNumber>1</pageNumber></signHere></signHereTabs></tabs></signer></signers></recipients></envelopeDefinition>
--BOUNDARY
Content-Disposition: form-data; name=test; filename=test.pdf; filename*=utf-8''test.pdf
<truncating binary>
REQUEST #2 (from template):
POST https://demo.docusign.net/restapi/v2/accounts/892965/envelopes HTTP/1.1
X-DocuSign-Authentication: <DocuSignCredentials>...</DocuSignCredentials>
Accept: application/json
Content-Type: application/xml; charset=utf-8
Host: demo.docusign.net
Content-Length: 421
Expect: 100-continue
<envelopeDefinition xmlns="http://www.docusign.com/restapi"><status>sent</status><emailSubject>DocuSign API - Signature Request from Template</emailSubject><templateId>29CB97E5-DCE1-4C14-91A8-A8317BCD29AD</templateId><templateRoles><templateRole><name>Wade Wegner</name><email>wade.wegner#gmail.com</email><roleName>Signing Role</roleName><clientUserId>1</clientUserId></templateRole></templateRoles></envelopeDefinition>
The ClientUserId causes a recipient to be an embedded recipient. If you provide a value then DocuSign will not send emails. The expectation is that you are going to handle the communication with the signer. This allows you to embed the signing experience within your own website or application.
I think without a trace of your JSON it's hard to figure out where the problems are. One problem could be that you create the envelope in the "created" instead of "sent" state. Another problem could be that you are providing a "clientUserId" which signals to our system that you are embedding the signing experience.
Why don't you get the status on the envelopes where you think you didn't get the e-mail and see what it looks like.
-mb
Sorry in advance for the newbie question.
I am using ASIHTTPRequest to send and receive packets.
However, when I send a packet from the client to the server, the packet has a header attached to it:
POST / HTTP/1.1
Host: 192.168.0.6:8080
Accept-Encoding: gzip
Content-Length: 64
User-Agent: ASIHTTPRequestTests 1.0 (iPod touch; iPhone OS 4.1; ko_KR)
Connection: close
PACKET_TESTM0001
The only information I want my client to send is: PACKET_TESTM0001
Is there a way to remove all the above header (All lines including POST to User-Agent)
Thanks in advance for your helpful response.
That header is required by the HTTP protocol, so better you don't remove it or your web server will not accept the request.
If you do no want to use the HTTP protocol (i.e., you do not want to talk to a web server), then you can use NSStreams with sockets.
There's some confusion here between "packet" and "HTTP request". Googling those two terms would probably be enlightening for you.
ASIHTTPRequest makes, as the name implies, HTTP requests. It wants to be talking to an HTTP server, and then probably to some sort of server-side code to process the request.
Have you rolled your own server, here? Because you're not doing what is expected when you're talking HTTP.
I'm fetching emails from a POP3 server and I'd like to make a difference between a regular email and DSN (Delivery Status Notification) / NDR (Non-Delivery Report/Receipt) messages.
What is the best/safest way to identify those messages? Are there any particular message-headers I should be looking for?
Thanks in advance!
Some mail servers implement RFC 3464. Those that do will typically generate Delivery Status Notifications with a message header Content-Type of multipart/report and three component parts (text/plain, message/delivery-status and message/rfc822). So you could detect those characteristics of the message and process accordingly. The message will generally look like this:
From: "Mail Delivery System" <MAILER-DAEMON#example.com>
Subject: Delivery Status Notification (Failure) Content-Type:
multipart/report; report-type=delivery-status
Content-Type: text/plain A human readable explanation of the
Delivery Status Notification.
Content-Type: message/delivery-status A structured machine readable
reason for the Delivery Status Notification.
Content-Type: message/rfc822 The original message.
For those mail servers that generate Delivery Status Notifications in an unstructured format, it is probably still necessary to detect their notifications by analysing the text of the From: and Subject: message headers.