How do I implement ‘sign in with google’ on my site?

If you plan to use OpenID, use that. Google is already an OpenID 2.0 provider. Google’s OpenID provider is located at: https://www.google.com/accounts/o8/ud (NOTE: There’s no point visiting that URI in your browser, but it does work for OpenID.) This is primarily addressed on the Accounts API page, which also addresses OAuth and the hybrid and … Read more

How to send email using simple SMTP commands via Gmail?

to send over gmail, you need to use an encrypted connection. this is not possible with telnet alone, but you can use tools like openssl either connect using the starttls option in openssl to convert the plain connection to encrypted… openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf -ign_eof or connect to a ssl sockect directly… … Read more

Using curl to send email

curl –ssl-reqd \ –url ‘smtps://smtp.gmail.com:465’ \ –user ‘username@gmail.com:password’ \ –mail-from ‘username@gmail.com’ \ –mail-rcpt ‘john@example.com’ \ –upload-file mail.txt mail.txt file contents: From: “User Name” <username@gmail.com> To: “John Smith” <john@example.com> Subject: This is a test Hi John, I’m sending this mail with curl thru my gmail account. Bye! Additional info: I’m using curl version 7.21.6 with SSL … Read more

Getting mail from GMail into Java application using IMAP

Using imaps was a great suggestion. Neither of the answers provided just worked for me, so I googled some more and found something that worked. Here’s how my code looks now. Properties props = System.getProperties(); props.setProperty(“mail.store.protocol”, “imaps”); try { Session session = Session.getDefaultInstance(props, null); Store store = session.getStore(“imaps”); store.connect(“imap.gmail.com”, “<username>@gmail.com”, “<password>”); … } catch (NoSuchProviderException … Read more

Unable to send email using Gmail SMTP server through PHPMailer, getting error: SMTP AUTH is required for message submission on port 587. How to fix?

$mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure=”ssl”; // secure transfer enabled REQUIRED for Gmail $mail->Host = “smtp.gmail.com”; $mail->Port = 465; // or 587 $mail->IsHTML(true); $mail->Username = “email@gmail.com”; $mail->Password … Read more

How can I download all emails with attachments from Gmail?

Hard one 🙂 import email, getpass, imaplib, os detach_dir=”.” # directory where to save attachments (default: current) user = raw_input(“Enter your GMail username:”) pwd = getpass.getpass(“Enter your password: “) # connecting to the gmail imap server m = imaplib.IMAP4_SSL(“imap.gmail.com”) m.login(user,pwd) m.select(“[Gmail]/All Mail”) # here you a can choose a mail box like INBOX instead # … Read more

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