Jump to content

ShaKeD

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ShaKeD's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey to all, I`m trying to send mail, with http://pear.php.net/package/Mail. my functions page formatted as ASCI UTF8 without BOM (using notepad++) and when I make my email, my header is $utf8h = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; when I return my $html I use return iconv("UTF-8", "ISO-8859-8", $html); and then send my email: preparing to send: $html = build_newsletter($values); $text = 'Text version of email'; // sends it to the clients list: require_once('Mail.php'); require_once('Mail/mime.php'); global $websiteName; $today = date("d/m/Y"); $hdrs = array( 'From' => "$websiteName mail <newsletter@".str_replace(" ","","$websiteName").".co.il>", 'Subject' => "[$today] ניוזלטר מאתר $websiteName: {$values['title']}", 'Content-type' => 'text/plain; charset=iso-8859-1' //str_replace(" "," ","[$today] ניוזלטר מאתר $websiteName: {$values['title']}") ); $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); //send our email! $x = $mail->send($client_address, $hdrs, $html); sorry about my bad english and thank you all for the help! Shaked.
  2. I don't wanna bug anyone , but maybe someone can help here?
  3. solved I meant $_SERVER['SERVERNAME'];
  4. Hey, I want to make a script that take my address and print it. I mean, if I`m now at www.phpfreaks.com I want to do somthing like echo $mywebsite and to get: www.phpfreak.com what do I need to write at $mywebsite for getting this result? thanks in advance, Shaked.
  5. hey all, i`m using phpbb forums and I learned the system throw her code. I`m trying to add html file (that doesn't belong to phpbb) on the top of the page (overall_header.tpl is the top of the page), my problem is that phpbb using <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8-I"> and my html file must use <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> how can I merge them, that I will see the html file at the top of my page, and then I will see the phpbb forum, without using IFRAME I tryied to use: $mywebpage = file_get_contents("mypage.html"); and then replace {mypagehtml} (at overall_header.tpl) with $mywebpage. Thank you for you help, Shaked.
  6. I used $lang as array lang.php - $lang[blah] = ' blah ' ; $lang[blaas] = ' blah sadf'; index.php - include 'lang.php'; $_GLOBALS['lang'] = $lang; but when I`m using $lang inside my functions it doesn't work.
  7. ok, thanks but maybe there is a way to "define" the include ?
  8. Hey, I`v a problem. I`m using include function. include 'lang.php'; now I want to use all of the variables that exist in lang.php .. the problem is that I`m using functions on my index.php file, and I don't want to enter the function every time with those variables. how can I fix it? 10x.
  9. ok , so how can I do this to work, this was my question. another way of course and not include to variable
  10. Hey all I`m using php file named test.php, and html file named style.sspic (sspic=my system files.). Now on my php file I have $upframe='my php test file blah blah balh'; $htmlpage = include 'style.sspic'; str_replace('{upframe}',$upframe,$htmlpage); and on my html file I have <html> <head> <title>Untitled 1</title> </head> <body topmargin="0" leftmargin="0" rightmargin="0"> <table style="width: 100%" class="style1"> <tr> echo <td align=center>{upframe}</td> </tr> </table> </body> </head> </html> how can I make it work , that when I open my php file, I will see {upframe} as $upframe ? Thanks for you time and help!
  11. ok so I`m using mbot plugin for miranda, this plugin give you to bulid things with php and use them on the miranda, so I have start to work on script that sends emaill throw miranda.. so I did this function : function dlg_callback($ok,$param) {   if($ok == 0)return 1; //cancel or close   $dlg = mb_DlgGet();   $user =  mb_DlgGetText($dlg,1000);   $subject = mb_DlgGetText($dlg,1002);   $message = mb_DlgGetText($dlg,1004);   $headers = "From: <email>\r\nReply-To: email";   if($subject != "" && $message != ""){     mail($user,$subject,$message,$headers);     mb_msgbox("your message has been sent to ".$user);     return 1;   }else{     mbox("you must use the subject and message body both.");     return 0; //if you want to finish the dialog return "end";   } } I checked if I get somthing in $message,$subject and $user and I did, I got everything I need for ex. : $user = myemail@gmail.com $subject = hey whats up! $message = this is a test the problem the I don't get any mail at all.. what can I do ? 10x :)
  12. I didn't understand the differenet.. . this is my code.. : [code]   <?php . . . $headers = "From: <email>\r\nReply-To: email";   mail($user,$subject,$message,$headers); . . . ?>[/code]
  13. Hey again, I was trying to use mail(); function and I got no luck, why is that? [code] mail($user,$subject."(from)",$message,"From $user"); [/code] $user= my email .. $subject = subject from edit box $message= from edit box...  what do you think?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.