Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
zubby is on a distinguished road
 
Posts: 29
Join Date: Oct 2008
Exclamation Help with Mail and PHP - 11-08-2008, 02:47 PM

Code:
if($err_flag!=1)
{
	 $ins_sql="insert into ask_question(from_id,item_id,date,question,to_id) values('$fromid','$item_id','$qst_date','$question','$to_id');";
	$ins_row=mysql_query($ins_sql);
	$status=1;

    
	
	$sql="select * from mail_subjects where mail_id = 3";
	$result = mysql_query($sql);
	$row = mysql_fetch_array($result);
	$mailsubject = $row['mail_subject'];
	$mailbody = $row['mail_message'];
	$mailto=$user_rec['email'];
	
	$mailbody = ereg_replace("<seller_name>",$seller_name,$mailbody);
	$mailbody = ereg_replace("<question>",$question,$mailbody);
	$mailbody = ereg_replace("<product_name>",$product_name,$mailbody);
	$mailbody = ereg_replace("<buyer_name>",$buyer_name,$mailbody); 
	$mailbody = ereg_replace("<sitename>",$site,$mailbody); 
	$mailbody=str_replace("<imgh>" , $mailheader , $mailbody);
    $mailbody=str_replace("<imgf>" , $mailfooter , $mailbody);
      
    $headers  = "MIME-Version: 1.0\n";
	$headers .= "Content-type: text/html; charset=iso-8859-1\n";
	$headers .= "Desde: ". $from."\n";
	if(mail($mailto,$subject,$mailbody,$headers))
		$status = 1; 
	else
	$status = 2;   
}
		
if($status==1)

I had this piece:

$headers .= "From: ". $from."\n";

and I translated to

$headers .= "Desde: ". $from."\n";

so ... in my native language as Desde


I translated "desde" everywhere i saw it, in every php. But now i receive my emails from site differently.

instead of sender name - mail@mysite.com

i receive now sender

myusername from cpanel
mail@454.hostgator.com ... ?

Where did it go my mail@mysite.com ? why now i receive mails signed with username instead of mail@mysite.com ?

I changed that this days and the ones who are working on the script to costumized at well... they are working on the script.

So is my fault or theirs ? Should i change back to From or is ok to let Desde...
that part must not be translated ?

Please reply. Big thank you.

Last edited by zubby : 11-08-2008 at 02:49 PM.
Reply With Quote
(#2 (permalink))
Old
Mr.Whisper's Avatar
Member
Mr.Whisper is on a distinguished road
 
Posts: 68
Join Date: May 2008
Send a message via MSN to Mr.Whisper
Default 11-09-2008, 02:45 PM

you cant use your native language as header subject.

you should keep original in english

it's like php called variable named "hello" but you were rename that var to "hola"


OSS-Zone

We present Freeware & Opensource to Everyone!
Reply With Quote
(#3 (permalink))
Old
Junior Member
zubby is on a distinguished road
 
Posts: 29
Join Date: Oct 2008
Default 11-09-2008, 02:52 PM

but i must translate even mail subject in my native subject. and sometimes i got mails with From ... not as i translated in admin mail subjects...

the problem is that i translated ?
Reply With Quote
(#4 (permalink))
Old
Junior Member
zubby is on a distinguished road
 
Posts: 29
Join Date: Oct 2008
Default 11-09-2008, 10:40 PM

i had to look in about 300 files for

$headers .= "Desde: ". $from."\n";

i found about 15 files translated and put back the original

$headers .= "From: " . $from."\n";

my emails are fine now. thank you.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com