gmail

Can't send an email using a google apps account with PHPMailer

这一生的挚爱 提交于 2019-12-06 02:26:06
Please note that I'm using a google apps account, NOT a gmail account. I'm trying to simply send an email using my google apps account with php. I am able to send an email in a .net application using the port 587 host smtp.googlemail.com and SSL enabled. The username is my full email address. require_once('PHPMailer_v5.1\class.phpmailer.php'); try { $mail = new PHPMailer(); $mail->Mailer = 'smtp'; $mail->SMTPSecure = 'tls'; $mail->Host = $host; $mail->Port = 587; $mail->SMTPAuth = true; $mail->Username = $from; $mail->Password = $password; $mail->AddAddress($to, $to_name); $mail->From = $from;

Set an email as SEEN on IMAP server

若如初见. 提交于 2019-12-06 02:25:28
问题 I am trying to read mail from an Imap Server (Gmail). I would check if there are new mail (unseen) and check it as seen. I wrote this code but imap_setflag_full seems to not work. If I have a new mail the script is unable to put the SEEN flag and it echo me that there is always one unseen mail. $mbox=imap_open( "{imap.gmail.com:993/ssl/novalidate-cert}" , $this->username, $this->password); if ($mbox) { echo "Connected\n<br><br>"; } else { exit ("Can't connect: " . imap_last_error() ."\n");

Make Gmail automatically show images I embed in my HTML email?

☆樱花仙子☆ 提交于 2019-12-06 02:12:01
问题 I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. How can I do this? 回答1: Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain: To ensure that Gmail can identify you: Use a consistent IP address to send bulk mail. Keep valid reverse DNS records for the IP address(es) from which you send

why is authentication: 'plain' the default setting for actionmailer in rails (with gmail smtp)?

耗尽温柔 提交于 2019-12-06 01:46:13
问题 I am reading up on actionmailer for rails. My question is about the default settings as described here: config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => 'baci.lindsaar.net', :user_name => '<username>', :password => '<password>', :authentication => 'plain', :enable_starttls_auto => true } now reading from the API here it says that: ":authentication - If your mail server requires authentication, you need

download gmail attachements from php

喜夏-厌秋 提交于 2019-12-06 00:33:37
can you please tell , how to download attachments from gmail account using php ? thanks IMAP Solution /* connect to gmail */ $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username = 'davidwalshblog@gmail.com'; $password = 'davidwalsh'; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error()); /* grab emails */ $emails = imap_search($inbox,'ALL'); /* if emails are returned, cycle through each... */ if($emails) { /* begin output var */ $output = ''; /* put the newest emails on top */ rsort($emails); /* for every email...

Cannot deliver email to Google Apps address; Gmail receives the same email fine

我的未来我决定 提交于 2019-12-06 00:00:18
I have a Drupal site with the Webform module installed to send out emails to a small group of people with Google apps accounts. It used to work; now, with nothing having been changed, they do not receive the messages at all. They are not in spam; they just never arrive period. However, if I put in my own personal Gmail address as a recipient, I receive it fine... not in spam or anything. I thought maybe the problem was that my domain (hosted at MediaTemple) didn't have an SPF record, so I added one: v=spf1 include:spf.mail01.mtsvc.net include:_spf.google.com ~all However, Google still doesn't

Programmatically logout from Gmail via Oauth

两盒软妹~` 提交于 2019-12-05 22:51:35
问题 I have a website where I use Oauth to log users into Gmail, and then retrieve their contacts and other info. What do I need to do to ensure that when the user logs-off my website, he automatically logs out from Gmail too? 回答1: As far as I know, there is no logout in OAuth. You simply stop sending tokens between your application and Gmail. 回答2: This may be a shortcoming of the 3-legged OAuth flow. The user must sign into their account to provide consent, but once they provide the consent, the

Custom mime type ignored in GMail app

狂风中的少年 提交于 2019-12-05 22:44:30
I'm trying to send a file in android using intents. I fire up an intent chooser and select the GMail app. The problem is that I can't set my custom mime type, it always becomes application/octet-stream. In older versions of the GMail app (or maybe older versions of Android, like pre-JB?) it worked fine doing like this: Intent sendIntent = new Intent(Intent.ACTION_SEND); // Add attributes to the intent sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Send my file"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(path)); sendIntent.setType(

python smtp gmail authentication error (sending email through gmail smtp server)

大兔子大兔子 提交于 2019-12-05 22:26:20
I have the following code import smtplib from email.mime.text import MIMEText smtpserver = 'smtp.gmail.com' AUTHREQUIRED = 1 # if you need to use SMTP AUTH set to 1 smtpuser = 'admin@myhost.com' # for SMTP AUTH, set SMTP username here smtppass = '123456' # for SMTP AUTH, set SMTP password here RECIPIENTS = ['online8@gmail.com'] SENDER = 'admin@myhost.com' msg = MIMEText('dsdsdsdsds\n') msg['Subject'] = 'The contents of iii' msg['From'] = 'admin@myhost.com' msg['To'] = ''online8@gmail.com'' mailServer = smtplib.SMTP('smtp.gmail.com',587) mailServer.ehlo() mailServer.starttls() mailServer.ehlo()

Can't send mail from localhost/xampp

随声附和 提交于 2019-12-05 20:16:50
Failed to connect to mailserver at "mail.google.com" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() I configured my xampp php.ini and sendmail.ini file to use my Gmail account for sending email from my PHP script. i am using xampp. after changing the [mail function] part of my php.ini looks like this (i have deleted commented outlines for simplicity) [mail function] SMTP = mail.google.com smtp_port = 587 mail.add_x_header = Off and my sendmail.ini file looks like this [sendmail] smtp_server=mail.google.com smtp_port=587 smtp_ssl=auto error_logfile=error.log