Jump to content

Search the Community

Showing results for tags 'gmail'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 8 results

  1. Alright so I have 3 pages. Signup, Password reset and Send message. All three pages/forms email to the recipient. So far my test have only been with hotmail and gmail. All emails go through for hotmail accounts. They show up in the hotmail. All emails DO go through for gmail accounts. But they don't show up in the gmail. The only page that gmail is able to receive emails from is "send message". The emails derived from that send message show up in gmail. The other two don't. There are not errors on the server side that show up. It clearly shows emails being sent. Does anyone have a clue why this is happening?
  2. Hello I have a mysql database with filds like Name , DEPT ,and DOB the table name is emp and database name is EMPMASTER i have pear mail working script using gmail smtp and a Mysql query that shows todays birthday , My question is how to mix these two codes to mail output of that Mysql query in mail ? please suggest. following is the php code and my sql query. <?php // Pear Mail Library require_once "Mail.php"; $from = '<user@user.com>'; $to = '<user@user.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' => 'user@gmail.com', 'password' => '123@123' )); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo('<p>' . $mail->getMessage() . '</p>'); } else { echo('<p>Message successfully sent!</p>'); } ?> SELECT * FROM emp WHERE MONTH(dob) = MONTH(NOW()) AND DAY(dob) = DAY(NOW());
  3. Hi, I managed to set up a simple smtp with sendmail and gmail in the PHP mail function. The thing is, is it possible to change the "from" email address to a different one, than the gmail account I'm using? No matter which $from I assign, the from address is always my gmail account, which I am using to send mails. Thanks
  4. Hello, I am using the latest version of PHPMailer to try and send mails. The SMTP server is configured to use the Gmail SMTP. Now the problem is that when I am sending mails to a person with a Gmail account there seems to be no problem but when I am sending my mail to someone with a non Gmail account for example Yahoo. The mail never reaches(I have checked the SPAM folder). My PHP Mailer setup is as follows-: <?php require_once('mailer/class.phpmailer.php');//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); $body = "<html><head></head><body><strong>This is a System generated message. PLEASE DO NOT REPLY TO THIS MAIL.</strong><br />Click on the following link to activate your account-:<br /><a href='http://www.google.co.in'>Click Here !! </a><br />END OF MESSAGE.</body></html>"; $body = eregi_replace("[\]",'',$body); $mail->IsSMTP(); // telling the class to use SMTP$mail->Host = "smtp.gmail.com"; // SMTP server$mail->SMTPDebug = 2; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only$mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "tls"; // sets the prefix to the servier$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server$mail->Port = 587; // set the SMTP port for the GMAIL server $mail->Username = "foobar@gmail.com"; // GMAIL username $mail->Password = "foobar"; // GMAIL password $mail->SetFrom("foobar@gmail.com", "foo"); $mail->AddReplyTo("foobar@gmail.com", "foo"); $mail->Subject = "foo bar"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $address = $_GET['email']; $mail->AddAddress($address); if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo;} else { } ?> <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>domail</title></head> < body></body></html> My Questions are as follows-: Do I have to reconfigure my SMTP every time I send my mail to a different account ? For example if I have to send it to a Yahoo account do I have to use the Yahoo SMTP or when I send my mail to a Rediff account do I have to use the Rediff SMTP ??PHPMailer doesn't report any errors, it just says that it sent the message but the message never arrives. Can't I just use one SMTP and send mails to any account ? I am using WAMP server on my PC to run my Apache Web Server. Will this create problems in sending mails even if PHPMailer is configured correctly ? Is it necessary to add a name with the receiver address in the line-: $mail->AddAddress($address); Do I have to write it like this $mail->AddAddress($address,"Receiver Name"); Since my mail will be sent to anyone signing up specifying the correct receiver name every time will be a little difficult to do. I am getting an error on the line-: $body = eregi_replace("[\]",'',$body); The problem is that the function eregi_replace() has become deprecated. According to the php.net documentation I have to use preg_replace() with the " i " switch. But since I am beginner to PHP and regular expression I can't figure out how to do that. Can someone give the code which accomplishes the same task as the line above using preg_replace. Thank You.
  5. Dear All, I am trying to put together a php application, which connects to Gmail IMAP server and downloads a user's inbox folders and mails. The problem I am currently facing (and apparently can't resolve) is, when I am downloading the gmail folders with imap_list function, I am getting localized labels / folder names. Is there any way to always get the native English names? I know that Google has an IMAP extension, namely XLIST, which addresses this issue, but I haven't found an example of using this extension with php. I've found examples of using XLIST with frameworks like Zend, but since I am not using them, those examples did not help me. Is there a way of using Google's and Apple's IMAP extension in php (without any framework)? Or, I have to use a php extension? Do you know if PEAR's IMAP library can handles the Google IMAP extension? Any help is highly appreciated! Regards, Antal
  6. I'm looking for a way to authenticate to Gmail's mail server with PHP without using "Mail::factory" or needing to include "Mail.php". Is there a way to do this?
  7. I'm having an issue using fsockopen to connect to smtp.gmail.com in which I always receive the error "Failed to connect to server: Connection timed out". The issue seems very similar to an old bug fixed in late 2010: https://bugs.php.net/bug.php?id=50953 I'm using the following script to test: // connect to the smtp server $smtp_conn = @fsockopen("ssl://smtp.gmail.com", // the host of the server 465, // the port to use: 25, 465, 587 $errno, // error number if any $errstr, // error message if any 5); // give up after ? secs // verify we connected properly if(empty($smtp_conn)) { $error = array("error" => "Failed to connect to server", "errno" => $errno, "errstr" => $errstr); echo "SMTP -> ERROR: " . $error["error"] . ": $errstr ($errno)\n"; } else { fclose($smtp_conn); echo "Connected!\n"; } Replacing the host argument with tsl://smtp.gmail.com or simply smtp.gmail.com and any combination of ports 25, 465, 587 also fails. Yet other smtps connect fine (e.g. smtp.live.com:587, smtp.mail.yahoo.com:465). A firewall or other blocking is not the issue. This is on a VPS with the firewall disabled and, furthermore, I can successfully connect to smtp.gmail.com (and send an email) via openssl s_client. So basic access to the server/port is not the prob. Is there any possibility this old bug (id=50953) is still lingering around in a fairly recent 5.3 version of PHP? Or any suggestions on other possible causes? I am using 5.3.17-1~dotdeb.0 and same code works fine on a different VPS with PHP 5.2.17-1.
  8. Hi, I'm trying to access my Gmail account by a socket connection (secure imap is closed by my provider). Currently I'm at this coding state (not very far...): //////////////////////////////////////////// // Open a socket if (!($fp = fsockopen('ssl://imap.gmail.com', 993, $errno, $errstr, 15))) die("Could not connect to host"); // Set timout to 1 second if (!stream_set_timeout($fp, 1)) die("Could not set timeout"); // Fetch first line of response and echo it echo fgets($fp); // Send data to server echo "Writing data..."; fwrite($fp, "C01 CAPABILITY\r\n"); echo " Done\r\n"; // Keep fetching lines until response code is correct while ($line = fgets($fp)) { echo $line; $line = preg_split('/\s+/', $line, 0, PREG_SPLIT_NO_EMPTY); $code = $line[0]; if (strtoupper($code) == 'C01') { break; } } echo "I've finished!"; fclose($fp); //////////////////////////////////////////// Output er følgende: * OK Gimap ready for requests from 94.231.108.221 g8if1416270lbr.32 Writing data... Done * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2 C01 OK Thats all she wrote! g8if1416270lbr.32 I've finished! But how do I get IMAP working, hope somebody has some examples / ideas / Morten
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.