Skip to main content

Posts

Showing posts with the label smtp

Can"t understand why Zend_Mail::addHeader() strips newlines

(Since this is my first SO question, let me just say I hope it's not too Zend-specific. As far as I can tell this shouldn't be a problem. Although I could have posted it in a Zend-specific forum, I feel like I'm at least as likely to get a good answer here, especially since the answer might involve MIME-related issues that transcend Zend Framework. I'm basically trying to understand whether the issue I'm facing should be considered a ZF bug, or if I'm misunderstanding something or misusing it.)

trying to send mail using swift mailer, gmail smtp, php

Here is my code: <?php require_once 'Swift/lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465) ->setUsername('me@ff.com') ->setPassword('pass'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Wonderful Subject') ->setFrom(array('me@ff.com' => 'MY NAME')) ->setTo(array('you@ss.com' => 'YOU')) ->setBody('This is the text of the mail send by Swift using SMTP transport.'); //$attachment = Swift_Attachment::newInstance(file_get_contents('path/logo.png'), 'logo.png'); //$message->attach($attachment); $numSent = $mailer->send($message); printf("Sent %d messages\n", $numSent); ?> AFter RUNNING GOT THIS ERROR... Fatal error: Uncaught exception 'Swift_TransportException' with message 'Expected response code 220 but got code "", with me

SMTP or PHP mail on VPS ( Or Physical Severs) - A Social Networking site

I am developing a social networking site. It has functionality like user registration, people exchanging messages and sending email notifications for people's actions (and many more). Currently I use PHP's mail function to send mails and it is working fine. I already set up a VPS and hosted the application. My question may be a dumb question. Do Facebook and other social networking sites use SMTP servers to send the notifications or only just any kind of PHP mail function? I read somewhere that using PHP's mail , there is a chance of mail going to SPAM folder. They advised using a certified SMTP server. So, if I have to use an SMTP server: 1) Do I have to purchase a certified SMTP server separately? Or can this be hosted on same VPS whatever I have. If so, what server software will be good for this? 2) Are there settings I have to do in SMTP servers like send unlimited messages, because we don't know how many people exchange emails in a minute, and that