PHP on T R A X
Rapid Application Development Made Easy

Reply to topic
Subject email with russian letters.
mind_support_


Joined: 28 Jul 2008
Posts: 14
Reply with quote
Hello!
Why i can't send mail with russian subject. Leter just comes with empty subject Sad
What should i do?
View user's profileSend private messageSend e-mailICQ Number
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
can you post some of your code?
View user's profileSend private message
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
maybe try setting the head_charset?

$my_mailer = new MyMailer;
$my_mailer->head_charset = 'koi8-r'; # or whatever it's supposed to be ...

The default charset is utf8.
View user's profileSend private message
Here's some code.
mind_support_


Joined: 28 Jul 2008
Posts: 14
Reply with quote
Code:


...
$mail = new Notifications();

                  $array_data = array_merge(
                     Session::get('UserProfile'),
                     Session::get('ConsultTime'),
                     Session::get('UserInfo'),
                     array
                     (
                        'place' =>  $this->ConsultTime->consult_place->name,
                        'time' =>  $this->ConsultTime->consultant_graph->start_date,
                        'aditional_info' => $this->UserInfo->aditional_info->name,
                        'reasons' => $reasons,
                        'fat' => $this->UserInfo->fat_history->name,
                        'rational' => $this->UserInfo->rational_food->name,
                        'fat_look' => $this->UserInfo->fat_look->name,
                        'fat_mass' => $this->UserInfo->fat_mass->name,
                        'prefered' => $this->UserInfo->prefered_product->name,
                        'addon' => $this->UserInfo->addon->name,
                        'activity' => $this->UserInfo->activity->name,
                        'activity_q' => $this->UserInfo->activity->q,
                        'sport_name' => $this->UserInfo->sport_name->name, 
                        'looses' => $looses,
                        'sports' => $sports,
                        'mineral' => $mineral->name,
                        'consultant' => $this->consultant,
                                'consult_time' => $this->consult_time,
                                'consultant' => $this->consultant,
                                'consult_month' => $this->month(date('n', strtotime($this->consult_time)))
                     )
                  );

                  $mail->deliver_register_success($array_data);

...

class Notifications extends ActionMailer {

    function register_success($array_data, $subject = null)
    {

                $this->subject    = REGISTER_SUCCESS;
                $this->recipients = $array_data['email'];
                $this->from       = ANKETA_NOTIFICATION_EMAIL;
                $this->headers    = array();
                $this->body       = $array_data;
                $this->content_type = 'both';
   }

...


and i've modified mailer code:

Code:
   
public
        $smtp_settings = array(
            'host'      => MAIL_HOST, # The server to connect.
            'port'      => MAIL_PORT,  # The port to connect.
            'persist'   => false, # Indicates whether or not the SMTP connection should persist over multiple sends.
            'auth'      => MAIL_SMTP_AUTH, # Whether or not to use SMTP authentication.
            'username'  => MAIL_USERNAME, # The username to use for SMTP authentication.
            'password'  => MAIL_PASSWORD, # The password to use for SMTP authentication.
        ),
        $sendmail_settings = array(
            'path' => '/usr/sbin/sendmail',
            'args' => '-i -t'
        ),
        $delivery_method = MAIL_DELIVERY, # mail | sendmail | smtp | test
        $perform_deliveries = true, # true will attempt to deliver mail | false will not deliver mail
        $default_charset = MAIL_CHARSET, # default charset for email.
        $head_charset = MAIL_CHARSET, # charset for email headers.
        $html_charset = MAIL_CHARSET, # charset for html email body.
        $text_charset = MAIL_CHARSET, # charset for text email body.
        $template = null, # view file to use for body of email.
        $template_root = null, # template_root determines the base from which template references will be made.
        $deliveries = array(), # if delivery_method is "test" it will not deliver but store emails in this array.
        $recipients = null, # to address(es)
        $subject = null, # email subject
        $from = null, # from email address
        $default_from = null, # if no from specified use this as the from.
        $body = array(), # array set in child class of values for view template.
        $preparse_body = array(), # holder for orginal body array from child class
        $headers = array(), # email headers
        $crlf = "\r\n", # linefeed char
        $content_type = "text"; # text | html | both

...


and my var MAIL_CHARSET is utf8.
and letter body is ok with russian characters.
and i do love pot Smile
when will be next release please?
View user's profileSend private messageSend e-mailICQ Number
Subject email with russian letters.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Reply to topic