• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dx Auth mail works strangely

#1
[eluser]Unknown[/eluser]
I have been working very for making my email look formatted using Dx_Auth library .

And after a lot try i changed the mail type to $config['mailtype'] = 'text'; . I wonder is it the correct way for formatting. should it work for for mailtype html instead of text.

Please reply me. I used smtp mail using dxauth.


function _email($to, $from, $subject, $message)
{
$this->ci->load->library('email');
$config['mailtype'] = 'text';
$config['charset']='utf-8';
$config['newline']="\r\n";
$config['crlf'] ="\r\n";
$config['protocol'] = 'smtp';
$config['wordwrap'] = TRUE;
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_user'] = 'shanavasnewage';
$config['smtp_pass'] = 'newagesystems';
$config['smtp_port'] = '465'; // SMTP Port.
$config['smtp_timeout'] = '15'; // SMTP Timeout (in seconds).

$this->ci->email->initialize($config);

$email = $this->ci->email;

$email->from($from);
$email->to($to);
$email->subject($subject);
$email->message($message);

return $email->send();

#2
[eluser]LuckyFella73[/eluser]
Which mailtype you should use depends on the mail you want to send.
If you want to send plain text mails then use "text" if you want to
format with html then you need "html".

I tried to send you a private message but you disabled that, so I have
to post it here in hope you read this soon:
NEVER EVER post real userdata of your mail accounts! Edit your post,
remove the userdata and change your gmail password before a baaad guy read your post!

#3
[eluser]Unknown[/eluser]
Hi LuckyFella thanks for your concern. Yeah i selected HTML for the email to make it formatted like html . But it got formatted correctly only after i changed $cofig['mailtype'] to text . I am a newbie to CI. Actually i am debugging some code and i could make the mail working correctly after i made it to text.

#4
[eluser]LuckyFella73[/eluser]
The user guide says:
Quote:Type of mail. If you send HTML email you must send it as a complete web page. Make sure you don't have any relative links or relative image paths otherwise they will not work.

Did you set up a complete html page or did you just wrap some html-tags around some
content? It makes no sense that a html email is only displayed correctly when
setting the type to "text" and not displayed when type is "html" ..

Can you post the complete content of your mail?

Please use CODE TAGS to wrap the code you post here. Makes it far more
easy to read for everybody.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.