Wednesday, February 3, 2010

Sending mails using phpmailer class

0 comments



The following script is for how sending mails using php code.

1) Download php classes from below url

http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6/


2) Place in your application www/yourapplication/

those files are class.phpmailer.php and class.smtp.php

3) Now take a another php file to send the mails.

require(“class.phpmailer.php”);

require(“class.smtp.php”);

// including files in your send mail file.

$mail = new PHPMailer(); // create a object to that class.


$mail->IsMail();

$mail->Timeout = 360;

$mail->Subject = ‘Test Subject’;

$from = ‘Anil Labs’;

$mail->From = ‘mail@yourdomain.com’;


$mail->FromName = ‘Anil Labs’;

$mail->AddReplyTo(‘mail@yourdomain.com’, $from);

$to = ‘user@somedomain.com’;

$mail->AddAddress($to, “”);


$mail->Body = “<html>

<head>

<title></title>

</head>

<body>

Test Message

</body>


</html>”;

$mail->IsHTML(true);

$mail->Send();

Then it will sends the mail to particular email-id.



www.tips-fb.com
Delicious

Tuesday, January 26, 2010

How to configure the url aliases in drupal

1 comments

How to configure the url aliases in drupal for friendly urls.
suppose your url like :

http://www.yourdomain.com/node/1

this page for about us page, then we can convert into in your friendly urls like
http://www.yourdomain.com/aboutus
for this we have to follow some configuration in drupal:
1) Administrator -> Site building -> URL aliases
2) Click on Add alias – then it go to form admin/build/path/add
3) Give the Existing system path like:


node/1
to Path alias:
aboutus
see the below image :


www.tips-fb.com
Delicious