how do I get a message(header + body) in variable?
I need to write it in a folder "sent"
how do I get a letter in variable?
Moderators: Chris Corbyn, General Moderators
how do I get a letter in variable?
Last edited by chlorid on Wed Aug 27, 2008 8:19 am, edited 1 time in total.
Re: how do I get a letter in variable?
Code: Select all
$variable = 'Letter';
print substr($variable, 0, 1); // L
print substr($variable, 1, 1); // e
print substr($variable, -1); // rRe: how do I get a letter in variable?
marcth wrote:See http://ca3.php.net/manual/en/function.substr.phpCode: Select all
$variable = 'Letter'; print substr($variable, 0, 1); // L print substr($variable, 1, 1); // e print substr($variable, -1); // r
Your answer is very originally..
But now i'm worked with Swift Mailer and I need to get full message of mail
I wrote:
$smtpServer='smtp.mydomain.ua';
$subject=$this->getRequestParameter('subject');
$to=$this->getRequestParameter('to');
$text=$this->getRequestParameter('text');
$swift= new Swift(new Swift_Connection_SMTP($smtpServer));
$message= new Swift_Message($subject,$text);
$swift->send($message,$to,'svalera@mydomain.ua');
==> Here I need to get formed message as text
Sorry for my bad english