argumentum Posted October 12, 2018 Posted October 12, 2018 2 hours ago, mBild said: I send $sBody, but also with $sBodyHtml if you look at the code, Local $aRet = gmailUsersMessagesSend($aRecipient, $sSubject, $sBody & $sBodyHtml, $sYourGmailAdress, $aToken, "Bearer", Default, $sAttachment) , you can see that there is no text or html. I'd format all as html to save the learning curve, or, https://www.google.com/search?q=email+body+format+rfc Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
mBild Posted October 13, 2018 Posted October 13, 2018 11 hours ago, argumentum said: if you look at the code, Local $aRet = gmailUsersMessagesSend($aRecipient, $sSubject, $sBody & $sBodyHtml, $sYourGmailAdress, $aToken, "Bearer", Default, $sAttachment) , you can see that there is no text or html. I'd format all as html to save the learning curve, or, https://www.google.com/search?q=email+body+format+rfc Many thanks for that tip!!! That solved it!!!
mBild Posted October 13, 2018 Posted October 13, 2018 Formatting the text file as html solved my problem... Many thanks for your help!!!
mBild Posted October 13, 2018 Posted October 13, 2018 14 hours ago, Jos said: Well, I am still not seeing any runable script so have no idea as I can't test unless I am going to spend time to code it myself. Jos Formatting the text file as html solved my problem... Many thanks for your help!!!
mBild Posted November 4, 2018 Posted November 4, 2018 Everything worked fine for the last couple of weeks. Suddenly I get the error: +++ Line: 148, Func: oAuth2RefreshAccessToken() -> Error durning reading $oHttp.ResponseText. Google must changed *json respond for this request. Can you please help. Many thanks!!!
argumentum Posted November 5, 2018 Posted November 5, 2018 16 hours ago, mBild said: Google must changed *json respond for this request. yes and no. The spaces is the problem. patch this Func _JsonValue($sString, $sStart, $sEnd, $iMode = 0, $bCase = False) $sString = StringStripWS($sString,8) $sStart = StringStripWS($sStart,8) $sEnd = StringStripWS($sEnd,8) and that should take care of it. ( untested as I have no internet, I'm tethering with my cell phone ) but it should work. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
x_bennY Posted November 15, 2018 Posted November 15, 2018 it's says that the email has been sent sucessfully but i do not receive values in "meesageid" and "threadid"... and the email is not sent, what's happening?
Kn0xx Posted November 30, 2018 Posted November 30, 2018 Hi, Im trying to make a an Email Sender with attachment for daily Reporting. But sometimes, the email can't be sent because there is not Internet Connection. Is there a way to add a function to resend after x hours / x days the email? The ideia is to send daily email with a daily attachment, if the daily day/attch fails sending. resend after X time ( resets cooldown to resend is sent is ok), and send the next email day from last one sent until no more days needed to be sent. Days are identified by filename( file01_23112018.csv) in the attachment. The send email part is easy I guess. but the function around the resend is the one that is making my head going nuts. Any help of to achieve this, some examples ? Ty!
Abo-Mota Posted December 1, 2018 Posted December 1, 2018 I think this UDF is better than STMP email Regards, Abo-Mota 😉, My FaceBook , 🌺 صلي ع النبي و تبسم 🌺
antalgu Posted September 11, 2019 Posted September 11, 2019 Hello, does anyone know how to get the info returned from the function gmailUsersMessagesList I was just trying it out and got that there was no error in the execution of the function, but i wasn't able to retrieve the information i wanted afterwards. It's strange because I thought the array returned from the function was 2D, but when asked for any on the elements it contained i got this error (2nd image), and if i treated it as if it was only 1D the MsgBox text would just appear to be blank.
antalgu Posted September 11, 2019 Posted September 11, 2019 And another question, i was doing this only in order to get the ID from the last message and be able to then get his content with gmailUsersMessagesGet( , but i just realized that the content from the email received doesn't just get into an array or something so that you can try to work with it, but rather in a json document, is there any way so avoid having to work with the data manually?
argumentum Posted September 11, 2019 Posted September 11, 2019 15 hours ago, antalgu said: And another question...... Welcome to the forum @antalgu, The solution mat be at https://www.autoitscript.com/forum/topic/192422-udf-gmail-api-emails-automation-with-autoit/?do=findComment&comment=1408292 Try that and see if it works. As far as doing something "manually", welcome to coding. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
GoogleDude Posted November 27, 2019 Posted November 27, 2019 Just wanted to say Thanks for this UDF/Library/API/Goodness! ~GD
lenclstr746 Posted May 21, 2020 Posted May 21, 2020 hi dude i got +++ Line: 141, Func: oAuth2RefreshAccessToken() -> Error durning send request to Google. $oHttp.Status = 400 $oHttp.ResponseText = { "error": "invalid_grant", "error_description": "Bad Request" } and i dont find refresh token ?
Developers Jos Posted May 21, 2020 Developers Posted May 21, 2020 Have you followed the registration steps as explained in the initial post? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
GoogleDude Posted July 28, 2020 Posted July 28, 2020 (edited) DELETE Edited July 28, 2020 by GoogleDude
xterix Posted January 19, 2021 Posted January 19, 2021 Hello. I do use Auth2 to access to Gmail, all works properly, but credential token has an expiration. Anyone has been able to renew the token without requesting again the web page and else?. I do need that automated. Thank you.
Ascer Posted February 2, 2021 Author Posted February 2, 2021 Hey mate, You need to use function: oAuth2RefreshAccessToken($sRefreshToken, $sClientId, $sClientSecret) This function is described in file oAuth.au3
tonycstechapps Posted March 9, 2021 Posted March 9, 2021 Can someone please help ? Attached screenshots randomly arrive blank. I tried to give 2 seconds delay after taking a screenshot, that kinda helped but i am still getting unreadable jpeg files. I did not modify the UDF's or how i send the message. I Simply take a screenshot before i send the email and then list it as an attachment. Sometimes picture needs time to be created so i sleep. Otherwise blank emails can arrive $PictureFile = (@ScriptDir & "\Sent\Snapshot" & $PicCount & ".jpg") _ScreenCapture_SetJPGQuality(50) ;50% quality screenshot Sleep(500) _ScreenCapture_Capture($PictureFile) ;take screenshot Sleep(2000) $sAttachment = $PictureFile gmailUsersMessagesSend($aRecipient, $sSubject, $sBody & $sBodyHtml, $sYourGmailAdress, $aToken, "Bearer", Default, $sAttachment) I get no errors. Message is sent but more often then not, picture is not readable, only text from body. Dont get me wrong, picture does get attached and received. Sometimes its 0 in size, sometimes its few kb's matching exactly the size of the original but its blank.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now