Skip to content

Instantly share code, notes, and snippets.

@ojimac
Created March 23, 2012 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojimac/2166881 to your computer and use it in GitHub Desktop.
Save ojimac/2166881 to your computer and use it in GitHub Desktop.
QdmailComponentのsmtp送信対応コード
function startup(&$controller) {
$this->Controller =& $controller;
if( defined( 'COMPONENTS' ) ){
$this->logPath(COMPONENTS);
$this->errorlogPath(COMPONENTS);
}
$params = array(
'host' => 'メールサーバー名',
'port' => 587 , // または25
'from' => 'fromメールアドレス',
'protocol' => 'SMTP_AUTH',
'user' => 'ユーザー名',
'pass' => 'パスワード',
);
$this->smtp(true);
$this->smtpServer($params);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment