I'm getting this LookupError when I try to use Get Links From Email keyword:
Open Mailbox server=imap.googlemail.com user=user#mail.com password=pass ${proWelcomeMail} = Wait for Email recipient=${USER_EMAIL} subject=Welcome
Open Link From Email ${proWelcomeMail}
...
Close Mailbox
Output:
ImapLibrary . Get Links From Email ${proWelcomeMail}
LookupError: 'quoted-printable' is not a text encoding; use codecs.decode() to handle arbitrary codecs
Is there a workaround for this please?
You can change the library's code by yourself because it's not fixed by the maintainer. Change the line 135 in file init.py "decode('quoted-printable')" to "decode('utf-8')".
Use the fork ImapLibrary2 which has fixed it already
https://pypi.org/project/robotframework-imaplibrary2/
Related
I'm new to apple scripting and I'm trying to copy two image from a folder and paste into outlook mail body, below is the code I have written so far to compose mail and I need help in pasting two images in the mail body.
I don't want it to be an attachment file, image needs to be pasted in mail body itself.
tell application "Microsoft Outlook"
activate
set theSubject to "Subject"
set theContent to "This is my content"
set theAttachmentFile to "XXXXX"
set sendToAddress to "abc"
set msg to make new outgoing message with properties {subject:theSubject, content:theContent} -> I'm missing something here
with properties {file:theAttachmentFile}
open msg
end tell
So in case if someone is struggling with this same question. I would like to answer what I implemented.
Compose your mail body content in html format and use img tag for inserting images in your mail body.
In my application I am sending mail to various users.The mail is attached with an .ics file. But when the user tries to open the file in Office365 an error pop ups which says
'The .ICS attachment can't be viewed because the format is not supported'.
Please see below the .ics file I have used
BEGIN:VEVENT
DTSTAMP:20170322T064351Z
DTSTART;TZID=America/Denver:20170323T110000
DTEND;TZID=America/Denver:20170323T113000
SUMMARY:WAND: Test Summary
TZID:America/Denver
LOCATION:
UID:20170322T064351Z-1#fe80:0:0:0:0:100:7f:fffe%12
DESCRIPTION:Candidate Name: Test User\nContact Phone Number: 1256355
END:VEVENT
END:VCALENDAR
The issue occurs when I have added the Timezone parameter recently.But this will work if I remove the Timezone parameter.
That is, if I replace
DTSTART;TZID=America/Denver:20170323T110000
DTEND;TZID=America/Denver:20170323T113000
with the below one
DTSTART:20170323T110000
DTEND:20170323T113000
the issue does not occur. But I need to add timezone.
Any additional elements need to add for the timezone parameter?
Please suggest.
The ics stream shown in your example seems to be truncated (missing at least the BEGIN:VCALENDAR) but assuming it is there in your actual ics, you are also supposed to include a VTIMEZONE component (before the BEGIN:VEVENT) that corresponds to the TZID=America/Denver used in your DTSTART/DTEND.
See for example the second example at https://www.rfc-editor.org/rfc/rfc5545#section-4
I am facing problem when passing value for url through data field.
I am passing value in goto url like this
="javascript:void(window.open('file:" &Fields!url.Value &"','_blank'))"
url value = /servername/foldername/FormuláriodeCalibração.xls
After report deployed and opened in internet explorer and clicked on the url. It is changing the url like this
/servername/foldername/FormuláriodeCalibração.xls
because of which I am unable to open the file.
Please help me in this.
Finally we come up with a solution of replacing non ASCII characters of Portuguese with HTML ASCII Codes.
For e.g. this is the actual file name of the attachment
TE-5180FormuláriodeCalibração(modelo)1271440308393(2)1338379011084.xls
We replaced the Portuguese characters with HTML ASCII Codes.
TE-5180FormuláriodeCalibração(modelo)1271440308393(2)1338379011084.xls
After these changes the above modified URL is passed in the place of actual URL and when it hits the server it was decoded properly and worked as expected.
I have a Dart [client side only, polymer] web-app. So I cannot use dart.io. I would like to do this semi-pseudo (language/platform mix!) code:
..
String str = "a load of text";
File file = new File('C:\\folder\\test.txt');
file.write(str);
file.close();
or
window.clipboard.copy(str);
so the user can paste it. I have used a TextAreaElement to put the string on (using textarea.value=str), and then the user can copy and paste it himself, but that's a bit naff.
Thanks
Steve
Sorry, you cannot write to files on the file system from a web app. The restriction is from browsers and their security model.
Is there a way to have swift mail place a message in the draft folder rather than just send. Trouble seems to be using the smtp instance with gmail. I've tried the imap_append like so:
$authhost="{smtp.gmail.com:993/imap/ssl}INBOX.Drafts";
$user="asdf#asdfasd.com";
$pass="asdkjasdf";
$mbox=imap_open( $authhost, $user, $pass);
//after creating the message $msg then using imap_append
imap_append($mbox,$authhost,$msg, "\\Draft");
the problem though is no matter how I modify $authhost I get a couldn't open stream. Am I missing something or is there perhaps a better alternative? Thanks
You're using the wrong folder name. The name isn't INBOX.Drafts in Gmail, it's [Gmail]/Drafts. INBOX.Drafts is what e.g. Fastmail calls the mailbox.