26-11-2009, 19:20
|
|
|
חבר מתאריך: 17.10.05
הודעות: 161
|
|
קראתי שוב והורדתי קובץ zip מהקישור שנתת.
אם הבנתי נכון אני צריך להעלות חלק מהקבצים לשרת שלי אז איזה קבצים להעלות?
מעבר לכך אני צריך ברשותך קצת הסבר על הקוד שמוצג שם על איזה שורות אפשר לוותר?
לא הבנתי חלק מהשורת אז מיספרתי אותן אני אשמח אם תוכל לומר לי מה תפקידם ואיזה מהן ניתן למחוק?
קוד PHP:
1.<?php // example on using PHPMailer with GMAIL 2.include("class.phpmailer.php"); 3.include("class.smtp.php"); // note, this is optional - gets called from main class if not 4.already loaded 5.$mail = new PHPMailer(); 6.$body = $mail->getFile('contents.html'); 7.$body = eregi_replace("[\]",'',$body); 8.$mail->IsSMTP(); 9.$mail->SMTPAuth = true; // enable SMTP authentication 10.$mail->SMTPSecure = "ssl"; // sets the prefix to the servier 11.$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server 12.$mail->Port = 465; // set the SMTP port 13.$mail->Username = "yourname@gmail.com"; // GMAIL username 14.$mail->Password = "password"; // GMAIL password 15.$mail->From = "replyto@yourdomain.com"; 16.$mail->FromName = "Webmaster"; 17.$mail->Subject = "This is the subject"; 18.$mail->AltBody = "This is the body when user views in plain text format"; //Text Body 19.$mail->WordWrap = 50; // set word wrap 20.$mail->MsgHTML($body); 21.$mail->AddReplyTo("replyto@yourdomain.com","Webmaster"); 22.$mail->AddAttachment("/path/to/file.zip"); // attachment 23.$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment 24.$mail->AddAddress("username@domain.com","First Last"); 25.$mail->IsHTML(true); // send as HTML 26.if(!$mail->Send()) { 27.echo "Mailer Error: " . $mail->ErrorInfo; 28.} else { 29.echo "Message has been sent"; 30.} ?>
לא הבנתי את שורות:6-8,15-16,19-25
תודה מראש
|