Gmail’s new image caching is breaking image links in newsletter

I think I have figured out the GoogleImageProxy issue. This is something related to CACHING concept. suppose, you have recently deployed your PHP code on your server but you forgot to upload images. you tested once with your email logic. your system generated an HTML email. When this email will hit the Gmail server GoogleImageProxy … Read more

How can I send an email by Java application using GMail, Yahoo, or Hotmail?

First download the JavaMail API and make sure the relevant jar files are in your classpath. Here’s a full working example using GMail. import java.util.*; import javax.mail.*; import javax.mail.internet.*; public class Main { private static String USER_NAME = “*****”; // GMail user name (just the part before “@gmail.com”) private static String PASSWORD = “********”; // … Read more

Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

When you try to send mail from code and you find the error “The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required”, than the error might occur due to following cases. case 1: when the password is wrong case 2: when you try to … Read more

How to send an email with Gmail as provider using Python?

def send_email(user, pwd, recipient, subject, body): import smtplib FROM = user TO = recipient if isinstance(recipient, list) else [recipient] SUBJECT = subject TEXT = body # Prepare actual message message = “””From: %s\nTo: %s\nSubject: %s\n\n%s “”” % (FROM, “, “.join(TO), SUBJECT, TEXT) try: server = smtplib.SMTP(“smtp.gmail.com”, 587) server.ehlo() server.starttls() server.login(user, pwd) server.sendmail(FROM, TO, message) server.close() … Read more

Send email using the GMail SMTP server from a PHP page

// Pear Mail Library require_once “Mail.php”; $from = ‘<fromaddress@gmail.com>’; $to = ‘<toaddress@yahoo.com>’; $subject=”Hi!”; $body = “Hi,\n\nHow are you?”; $headers = array( ‘From’ => $from, ‘To’ => $to, ‘Subject’ => $subject ); $smtp = Mail::factory(‘smtp’, array( ‘host’ => ‘ssl://smtp.gmail.com’, ‘port’ => ‘465’, ‘auth’ => true, ‘username’ => ‘johndoe@gmail.com’, ‘password’ => ‘passwordxxx’ )); $mail = $smtp->send($to, $headers, … Read more

Sending email in .NET through Gmail

Be sure to use System.Net.Mail, not the deprecated System.Web.Mail. Doing SSL with System.Web.Mail is a gross mess of hacky extensions. using System.Net; using System.Net.Mail; var fromAddress = new MailAddress(“from@gmail.com”, “From Name”); var toAddress = new MailAddress(“to@example.com”, “To Name”); const string fromPassword = “fromPassword”; const string subject = “Subject”; const string body = “Body”; var smtp … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)