iam using QT and Qsslsocket to get some emails body from Gmail using IMAP, I started using the IMAP command to log in, check how many emails I have, and fetch the data from the email I selected I use this commands sure after connected to IMAP using hostname and port.
tag login username password
after login and check the number of messages using tag select inbox I use this command to extract the body of the email.
tag fetch message_number (body[1])
the problem is i got very strange words like this
* 5 FETCH (BODY[1] {1856}
SGkgRmVsaXggYW5kIEZpbmdlcnMgRHVlbGluZyBQaWFub3MsCgpWaWN0b3JpYSBBLiBoYXMg
dXBkYXRlZCB0aGVpciBldmVudC4KClRoZSBwZXJmb3JtYW5jZSBsZW5ndGggaGFzIGJlZW4g
Y2hhbmdlZCB0byAzIGhvdXJzLgoKVGhlIHBlcmZvcm1hbmNlIHN0YXJ0IHRpbWUgaGFzIGJl
ZW4gY2hhbmdlZCB0byA1OjAwcG0uCgoKCgpVc2UgdGhlIGxpbmsgYmVsb3cgdG8gdmlldyB0
aGlzIGxlYWQ6Cmh0dHA6Ly90cmFja2luZy5naWdzYWxhZC5jb20vdHJhY2tpbmcvY2xpY2s/
ZD1RS1FFeEQxZGtIQTZrYWE3YzFXSzcxZ2VDVXBNX0F5UFRkcUpjeUVZcWZwN3RuMklNRXIx
WlRCOVcxYzlfR3VaUEFyaFhJQkIxbWl4S29jSDZXb1dVUTdlUkRsNl8zMTlPSXpLS0NGZmUz
X2FnQmRlN2lPd2hWaFczOXB2V25SMTY0R1JjaWdoYlZVSVpwT2k1NmxnOVhlV2JLcnhEVS05
WGJTWlBnZzhFRU9SMAoKUGVhY2UsIGxvdmUgJiBnaWdzLApUaGUgR2lnU2FsYWQgVGVhbQoK
CkZvbGxvdyBVcyEKRmFjZWJvb2sgaHR0cDovL3RyYWNraW5nLmdpZ3NhbGFkLmNvbS90cmFj
a2luZy9jbGljaz9kPXhkeEJya3I0eFZ0VE95bnhLbzFnUG1FR05HZU1TSlA5ODFSSVpUeEFJ
QlgzVmZuX3BBbk94Y2JMdUdURXpIR1RLWGVEMk9qUjFEc1NPeGRkX1Y4MjFWZXVYY1BEVXZv
TWNleWMwZHVPUXQtMXVDRjNxcHpVNGxDQmViT2VZbUpINVEyClR3aXR0ZXIgaHR0cDovL3Ry
YWNraW5nLmdpZ3NhbGFkLmNvbS90cmFja2luZy9jbGljaz9kPVY3LWpwbEZHVk5QcGExaVdU
VGF2aG5XZWJRLXRDQXZRakN6T2NBRXdCNDZ2R0FtbkplOFBfdHhycXdQUnhBallZbk9DRElt
ZktFeVAxQlNVR1J4MXhWelE4c3gxM2x1eWtoN3pKNXBXa1VKSEtPYThCYlRuUHF6Ykd1VGF0
THVTa3cyCkluc3RhZ3JhbSBodHRwOi8vdHJhY2tpbmcuZ2lnc2FsYWQuY29tL3RyYWNraW5n
L2NsaWNrP2Q9eEMzVEhBbjgyRTZuZ2piQXN6ZHRRVWZQcktNTVAwbDBpbzl0UDgxOW5SazBC
WDdvZmdZLU1OVk1jR2owTXdWQTNhZmV5aUh1T2VBSUE0V0tTM1NLZnU4Wk1nMENJRmszdnR3
X0F4Q1M2aWdiMDdCazBsU0p4QWNQYlJpc19uaFpNdzIKCgpTdG9wIGFsbCBHaWdTYWxhZCBl
bWFpbHMgKG5vdCByZWNvbW1lbmRlZCk6Cmh0dHA6Ly90cmFja2luZy5naWdzYWxhZC5jb20v
dHJhY2tpbmcvdW5zdWJzY3JpYmU/bXNnaWQ9UzQzLVFsVDVBbHhiaUl0SmhxU0NuZzIKCsKp
IFRoZSBHaWcgQnVyZWF1LCBMTEMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFBlYWNlLCBsb3Zl
ICYgZ2lnc8KuIGlzIGEgcmVnaXN0ZXJlZCB0cmFkZW1hcmsgb2YgVGhlIEdpZyBCdXJlYXUs
IExMQy4KMjczMyBFLiBCYXR0bGVmaWVsZCBSZCAjMTA1IFNwcmluZ2ZpZWxkLCBNTyA2NTgw
NA==
)
but the email contains normal message have normal words the strange is when i test with another gmail, i take this email from first email and send it forward message to my second email, it give me the normal text in it! so please any help i can't understand what is the problem, also what i tried is using openssl which give me same result as QT strange words, and javaMail library and extract text from first email it worked? so is the problem from the imap command i used or what?
Thanks in advance.
this a screenshot of the email message
Update
when i start some search i checked that this message is encoded to base64 and when i used online decoder it convert to the normal text but the question now is what command should i use so that i can fetch this message body text in normal text automaticly if there is such away.
Related
I have an email for customer, Its bcc we have the Subscriber's company Email.Email Contain a link to web page.Now the problem is the link is passing IsCustomer=true which becomes the reason for a function to be executed.I want to replace IsCustomer=true with IsCustomer=false or disable the link for BCC only.
I do not have an option to send two separate emails.
Technically, the requirement seems weird to me as why we should be able to change the email content of same email for recipient and BCC.
I have studied the personalizations topic here and I am doubtful about this.
Is there any way to achieve that?
I am trying to input email and password into PayPal (sandbox mode) using my Robot Framework script. This is a snippet of my code:
input text login_email ${email}
input text login_password ${password}
login_email is the name of the input field for the email and login_password is for the password.
I am passing the email in the ${email} argument and the password in the ${password} argument.
This doesn't seem to work for some reason. I keep getting this error:
InvalidElementStateException: Message: Element is not currently interactable and may not be manipulated
The email and password field for PayPal are generated upon the loading of the page. Can that be a reason why they are not accessible? Can anybody help me identify what am I doing wrong here?
As Correctly said by Ofer Steinberg , try to find the XPATH manually
Also, add a wait point until that item is visible and the enter name and password
as many times item is present and hidden due to which it says item not interactable.
It seems you have there a 'not constant' id (or similar..).
I had this problem, and the solution was to change the input path from id to xpath.
Moreover, try to inspect the paths manually in 'guest mode' (I guess you using chrome), it should show that page source more accurately since the selenium running by it.
I have a general question. Should we normally sanitize the SMS text command that the user inputs via their phone for which we send the response? If yes should we sanitize right away i.e. as soon as it comes? Any ideas for the ways that this can be done in asp.net V4.5/MVC?
I am using Twilio. Does Twilio Helper have any APis to do this?
Should we normally sanitize the SMS text command that the user inputs via their phone for which we send the response?
I'm assuming you mean "send to the response", as in Response object in ASP.NET?
Like all input to your application, you should properly encode it when output to the response. You can usually store it in raw, unencoded format in your database, but if this is output to HTML or JavaScript then it should be encoded properly.
e.g. If the " character is output into HTML, then you should encode this as " at the point of output. In MVC, this is automatically done by Razor using the #variable syntax. In classic MVC, the syntax is <%: variable%> (never use <%=variable%> as this will not encode).
If output to JavaScript then it should be hex entity encoded, so " becomes \x22. You can do this in MVC using #Html.Raw(HttpUtility.JavaScriptStringEncode(variable)) (this example is using Razor).
Check out the OWASP XSS Prevention Cheat Sheet for tips on how to encode correctly depending on output context.
In my project i have created a site from where my users or clients can send some documents to other users.
I also want to see if the recepient has read the mail/has the mail been sent.
Now i want to store the value of the result ie either "Sent" in case the mail has been successfully delivered. And "Viewed" when the mail has been opnened or read by the recepient.
I have done this code
MailMessage mailme = new MailMessage();
mailme.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
As i said above i want to store the value "Sent" or "Viewed" inside a string. Further ill store the values inside my tables.
How do i get the desired result. Basically i need to get the delivery report and report if the mail has been viewed.
Also i want to get the date as well as time when the mail was viewed by the recepient.
Thank you.
You might be looking for this:
mailme.Headers.Add("Disposition-Notification-To", "yourmail#mail.com");
where "yourmail#mail.com" should get a mail if the mail was read.
I am using the node invite and token module.
I have followed this flash tutorial video: http://www.adevbox.com/files/2008-06-25_1703.swf
My problem is regarding the email format being sent.
In the ?q=admin/settings/node_invite
I have checked the blog entry checkbox. Now the node invite works but I can't format my body section value correctly.
For example:
I entered in the textarea
Hi <bold>
Then the result when I open the email message is still the same:
Hi <bold>
Same with if I use <b>bold here</b> then it will also be the format when I open the email message.
How can I format it correctly? Am I missing something simple? I am thinking of using htmlspecialchars but I don't where to put it.
Thanks in advance :)
Kind Regards,
Mark
My understanding of the Invite module is that there is no Input Filter for the template. This means that the only format that is accepted is plain text. This means that it will convert HTML into the escaped code you see.
You can validate this looking at the variables in the database. Your best bet it so path Invite (or ask for a features) to allow HTML as a valid format.