0 0 vote
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Shany Mathew
Shany Mathew
4 years ago

Hi,Arjun, write pdf using mpdf and attach to email not getting. please helppublic function send_mail() {

$this->load->library(’email’);

$subject = ‘Request For Quotation’;

$message = ‘This message has been sent for testing purposes.’;

// Get full html:

$body =

‘.html_escape($subject).’

body {

font-family: Arial, Verdana, Helvetica, sans-serif;

font-size: 16px;

}

‘.$message.’

‘;

$this->load->library(‘M_pdf’);

//$newFile = base_url().’assets/jikemails/OUTS.pdf’;

$this->m_pdf->pdf->setTitle(‘Request for Quotation’);

$html=’hiiiiiiiiiiiiiiiiiiiiiiiiiiiiii’;

$this->m_pdf->pdf->WriteHTML($html);

$this->m_pdf->pdf->Output(‘assets/jikemails/OUTS.pdf’, “F”);

// Also, for getting full html you may use the following internal method:

//$body = $this->email->full_html($subject, $message);

$this->email->SMTPAuth = true;

$result = $this->email

->from(‘[email protected]’)

// Optional, an account where a human being reads.

->to(‘[email protected]’)

->subject($subject)

->message($body)

->attach($newFile)

->send();

var_dump($result);

// echo ”;

echo $this->email->print_debugger();

exit;

}

DMCA.com Protection Status
1
0
Would love your thoughts, please comment.x
()
x