saghishab
13-04-2008, 23:29
اين كد ارسال ايميل منه
<?php
session_start();
$_SESSION[b] =$_POST['mail'];
/***you must include this file to send email by smtp
* you must modify configure setting in MailConfigure.php file
***/
require_once("MailConfig.php");
// $mail=$_POST['mail'];
$from = "Info@koohozendegi.ir";
$name = "kooho zendegi";
$message= $_POST["answer"];
$subject="you recevice from name -- ".$name;
$retrun=Send_mail($from,$name,$subject,$message,1) ;
/*Send_mail(
* @param string $from who send this email
* @param string $fromname name who send this email
* @param string $subject mail sibject
* @param string $message mail message
* @param int $format 1 html mail format 0 text mail format
* @return bool true successful false fail
* )
*/
?>
<html>
<body>
<?if($retrun) echo "you email has been sent!";
else echo "Your email was failed";?>
</body>
</html>
------------
من با سيشن مي خواستم ايميل شخص گيرنده رو به صفحه mailconfig بفرستم چون اونجا تنظيمات smtp انجام ميشه
اما باز ايميل ارسال نميشه چرا ؟؟؟؟
------
<?
//session_start();
// $email=$_SESSION[b];
echo $email;
/* You must modify configure in this Send_mail function, in order to successful send email
* @param string $from who send this email
* @param string $fromname name who send this email
* @param string $subject mail sibject
* @param string $message mail message
* @param int $format 1 html mail format 0 text mail format
* @return bool true successful false fail
*/
function Send_mail($from,$fromname,$subject,$message,$forma t=0)
{
$mail = new PHPMailer(); //create a mail instance
$mail->IsSMTP(); //Set Mailer is SMTP
/**You must modify all configure setting in this script
* start configure setting script **/
//fromname="Jack"; //name who send this email
$toemail =$email;
-------اينم قسمت كمي از كد صفحه mail config.php
<?php
session_start();
$_SESSION[b] =$_POST['mail'];
/***you must include this file to send email by smtp
* you must modify configure setting in MailConfigure.php file
***/
require_once("MailConfig.php");
// $mail=$_POST['mail'];
$from = "Info@koohozendegi.ir";
$name = "kooho zendegi";
$message= $_POST["answer"];
$subject="you recevice from name -- ".$name;
$retrun=Send_mail($from,$name,$subject,$message,1) ;
/*Send_mail(
* @param string $from who send this email
* @param string $fromname name who send this email
* @param string $subject mail sibject
* @param string $message mail message
* @param int $format 1 html mail format 0 text mail format
* @return bool true successful false fail
* )
*/
?>
<html>
<body>
<?if($retrun) echo "you email has been sent!";
else echo "Your email was failed";?>
</body>
</html>
------------
من با سيشن مي خواستم ايميل شخص گيرنده رو به صفحه mailconfig بفرستم چون اونجا تنظيمات smtp انجام ميشه
اما باز ايميل ارسال نميشه چرا ؟؟؟؟
------
<?
//session_start();
// $email=$_SESSION[b];
echo $email;
/* You must modify configure in this Send_mail function, in order to successful send email
* @param string $from who send this email
* @param string $fromname name who send this email
* @param string $subject mail sibject
* @param string $message mail message
* @param int $format 1 html mail format 0 text mail format
* @return bool true successful false fail
*/
function Send_mail($from,$fromname,$subject,$message,$forma t=0)
{
$mail = new PHPMailer(); //create a mail instance
$mail->IsSMTP(); //Set Mailer is SMTP
/**You must modify all configure setting in this script
* start configure setting script **/
//fromname="Jack"; //name who send this email
$toemail =$email;
-------اينم قسمت كمي از كد صفحه mail config.php