setUsername($sender) ->setPassword('yourEmailPassword') ->setStreamOptions($https); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance($subject) ->setFrom(array($sender => 'Chinese Project')) ->setTo($getter) ->setBody($content) ; $result = $mailer->send($message); $success = $result ? 0 : 1; return $result;}