gmail

Connecting to the Gmail IMAP API in javascript/node.js

爱⌒轻易说出口 提交于 2019-12-02 21:07:08
I am trying to connect to gmail via its IMAP API . I am using Bruno Morency's node-imap library for that. For creating the oauth_signature, timestamp and nonce I use another library . To be more specific: The ressource-owner has already authenticated the consumer. So I do have an access-token + secret. Of course I also have the consumer's secret+token. So what I want is to login with the XOAuth mechanism described here (heading: SASL Initial Client Request). When executing the code I get an error: Error while executing request: Invalid credentials d43if2188869web.36 I wonder what I am doing

Using Gmail message source, generate direct link

孤街醉人 提交于 2019-12-02 21:06:34
So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface? on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following https://mail.google.com/mail/#all/<HexEncodeMessageID> Is this related to the Message=ID header found in the mail's source? Message-ID: <SomeID@SomeID.mail> The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions. Update This bookmarklet no longer works. See Benjamin Ziepert's update . Original Answer I decided to make a bookmarklet to help automate this.

server send emails using gmail smtp gets alerts

你。 提交于 2019-12-02 21:05:11
I did something like this to make my web app sends mails through gmail's SMTP. I tried locally and it worked. after I upload to the server (which is in another country) I get this error: authentication failure [SMTP: Invalid response code received from server (code: 534, response: 5.7.9 Please log in with your web browser and then try again. Learn more at 5.7.9 https://support.google.com/mail/bin/answer.py?answer=78754 5.7.9 {WEBLOGINREQUIRED} fl2sm1579003pab.23 - gsmtp)] is there a way to ignore this? For anyone still interest the answer: Google have to allow your app to use your own account,

Access Gmail Imap with OAuth 2.0 Access token

三世轮回 提交于 2019-12-02 20:49:13
I am using Google's Oauth 2.0 to get the user's access_token, but I dont know how to use it with imaplib to access inbox. user303110 Below is the code for IMAP with oauth 2.0 email = 'k@example.com' access_token = 'vF9dft4qmTc2Nvb3RlckBhdHRhdmlzdGEuY29tCg' auth_string = 'user=%s\1auth=Bearer %s\1\1' % (email, access_token) imap_conn = imaplib.IMAP4_SSL('imap.gmail.com') imap_conn.debug = 4 imap_conn.authenticate('XOAUTH2', lambda x: auth_string) imap_conn.select('INBOX') for more details see the library code . Currently you can use OAuth 1.0 to access Gmail over IMAP and SMTP, but OAuth 2.0 is

Gmail wraps certain HTML elements in a class called im

Deadly 提交于 2019-12-02 19:59:05
I have been testing out an HTML e-mail process I've created recently. But as of lately, when I open the e-mail in Gmail, I'm noticing that certain elements are wrapped in a class that I know I didn't put in the original HTML layout. In fact I just triple checked! When viewing the HTML email in Gmail, random sections of my form are being wrapped with... <div class="im"> .... </div> As a result, some text turns purple, while other text does not. Why does this happen? Thanks Gmail seems to think that you are quoting other emails in a conversation and so is wrapping div.im around the sections of

unable to send mail in php using mailer class

霸气de小男生 提交于 2019-12-02 19:52:56
问题 Today i was doing some mailing stuff in the php, I found that there are two methods for that one is the simple mail function provided by the Php and the second i found on the internet it was about using the PHP mailer class from the site https://github.com/PHPMailer/PHPMailer. the problem is that which i run my program than the mail is not being sent. Let's have a look at the code <?php include 'PHPMailer-master/class.phpmailer.php'; $mail = new PHPMailer(); // create a new object $mail-

How to generate an XOAUTH parameter using OAuth2.0 for use with Gmail IMAP protocol?

北慕城南 提交于 2019-12-02 19:47:56
I have a user authorized to access their gmail through imap using OAuth2.0. I have the OAuth2.0 access token (and refresh token). But I am having trouble figuring out how to map that into an XOAUTH parameter. All the documentation for generating the XOAUTH parameter are written assuming OAuth1.0. I can follow the sample code make this work with OAuth1.0. But my server is using OAuth2.0 for other things and I want to use the same code. From my Googling, I don't think it's currently possible to construct an XOAUTH param for IMAP using the OAuth2 access token. This is something Google really

How to send html emails to gmail with php? yahoo works not gmail

江枫思渺然 提交于 2019-12-02 19:36:19
问题 I've been using php to send html emails to people daily for over a year and it has always worked until today, all the emails sent to gmail accounts just displayed the html code. I haven't changed any code recently. It always just displays the html code now in gmail instead of showing the hyperlinks and images. Here's what it shows: Reply-To: updates@mysite.com MIME-Version: 1.0 Content-type: text/html; charset=UTF-8 X-Mailer: PHP/5.3.2 Message-Id: <20120426030303.E8B03A295@www1.mysite.com>

How to add link in subject of email (gmail)

不打扰是莪最后的温柔 提交于 2019-12-02 19:16:28
Is there a way to add link in subject of email? Following is the example of YouTube - Here in my code I'm trying the following but still unsatisfactory result. The below code is sending the subject as it is with printing the whole anchor tag in the subject. public function contact_us($data) { $from = "from@example.com"; $to = "to@example.com"; $view = 'emails/contact_us'; $subject = "Contact Us <a href='http://www.example.com'>Link</a>"; $view_data = $data; $this->send($from,$to,$subject,$view,$view_data); } I'm glad you asked! This is an awesome new feature and standard Google is supporting,

Converting External CSS to Inline CSS for Mail in Rails

南楼画角 提交于 2019-12-02 18:44:29
I am trying to create an application that will send out style-heavy emails and have required clients working except Google's Gmail. I researched the issue and it looks like Gmail strips out CSS from external files or CSS nested in the 'style' tag. Does an easy way exist of moving style from an external file to being inline? Something that will take: <style> .wide { width: 100px; } .cell { display: block; } </style> <span class="wide cell">Sample</span> And convert it to: <div class="wide cell" style="width: 100px; display: block;">Sample</div> Thanks! Here are couple of gems you can check out: