Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Help naman po about sa pag ayos ng phpmailer (php noob here )

ScreamAimsFire

Proficient
Advanced Member
Messages
228
Reaction score
13
Points
38
:help: naman po kasi nag search na po ako sa google and youtube kung pano mapagano po to sa contact form ko po pero no luck pa din ako kasi diko pa po na try gumawa/mapagana yung contact form ko medyo hirap pa po ako sa php sana po matulungan nyo ako mga sir :(


Code:
 <div class="row">
                <div class="col-lg-12">
                	<?php
					if ($_POST) {
					require 'phpmailer/PHPMailerAutoload.php';

					$mail = new PHPMailer;

					//$mail->SMTPDebug = 3;                                                         // Enable verbose debug output

					$mail->isSMTP();                                                                   // Set mailer to use SMTP
					$mail->Host = 'smtp.mail.yahoo.com';  				    // Specify main and backup SMTP servers
					$mail->SMTPAuth = true;                                                   // Enable SMTP authentication
					$mail->Username = '[email protected]';                       // SMTP username
					$mail->Password = '1234567890';                                                   // SMTP password
					$mail->SMTPSecure = 'tls';                                                             // Enable TLS encryption, `ssl` also accepted
					$mail->Port = 587;                                                         // TCP port to connect to
            
					$mail->setFrom('[email protected]', 'Mailer');
					$mail->addAddress('[email protected]', 'Joe User');     			// Add a recipient
					$mail->addAddress('[email protected]');               		// Name is optional
					$mail->addReplyTo('[email protected]', 'Information');
					$mail->addCC('[email protected]');
					$mail->addBCC('[email protected]');

					$mail->addAttachment('/var/tmp/file.tar.gz');                               // Add attachments
					$mail->addAttachment('/tmp/image.jpg', 'new.jpg');                   // Optional name
					$mail->isHTML(true);                                                                  // Set email format to HTML

					$mail->Subject = 'Here is the subject';
					$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
					$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

					if(!$mail->send()) {
    					echo 'Message could not be sent.';
    					echo 'Mailer Error: ' . $mail->ErrorInfo;
					} else {
   					 echo 'Message has been sent';
						}

						}
					?>

                    <form name="sentMessage" id="contactForm" novalidate>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <input type="text" class="form-control" placeholder="Your Name *" id="name" required data-validation-required-message="Please enter your name.">
                                    <p class="help-block text-danger"></p>
                                </div>
                                <div class="form-group">
                                    <input type="email" class="form-control" placeholder="Your Email *" id="email" required data-validation-required-message="Please enter your email address.">
                                    <p class="help-block text-danger"></p>
                                </div>
                                <div class="form-group">
                                    <input type="tel" class="form-control" placeholder="Your Phone *" id="phone" required data-validation-required-message="Please enter your phone number.">
                                    <p class="help-block text-danger"></p>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <textarea class="form-control" placeholder="Your Message *" id="message" required data-validation-required-message="Please enter a message."></textarea>
                                    <p class="help-block text-danger"></p>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="col-lg-12 text-center">
                                <div id="success"></div>
                                <button type="submit" class="btn btn-xl">Send Message</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

So far yan pa lang po yung nagagawa but no luck for me nothing happens after ko mag send ng email sana po may makatulong still in learning progress pa lang po ako.
 
Last edited:
:help: naman po kasi nag search na po ako sa google and youtube kung pano mapagano po to sa contact form ko po pero no luck pa din ako kasi diko pa po na try gumawa/mapagana yung contact form ko medyo hirap pa po ako sa php sana po matulungan nyo ako mga sir :(


Code:
 <div class="row">
                <div class="col-lg-12">
                	<?php
					if ($_POST) {
					require 'phpmailer/PHPMailerAutoload.php';

					$mail = new PHPMailer;

					//$mail->SMTPDebug = 3;                                                         // Enable verbose debug output

					$mail->isSMTP();                                                                   // Set mailer to use SMTP
					$mail->Host = 'smtp.mail.yahoo.com';  				    // Specify main and backup SMTP servers
					$mail->SMTPAuth = true;                                                   // Enable SMTP authentication
					$mail->Username = '[email protected]';                       // SMTP username
					$mail->Password = '1234567890';                                                   // SMTP password
					$mail->SMTPSecure = 'tls';                                                             // Enable TLS encryption, `ssl` also accepted
					$mail->Port = 587;                                                         // TCP port to connect to
            
					$mail->setFrom('[email protected]', 'Mailer');
					$mail->addAddress('[email protected]', 'Joe User');     			// Add a recipient
					$mail->addAddress('[email protected]');               		// Name is optional
					$mail->addReplyTo('[email protected]', 'Information');
					$mail->addCC('[email protected]');
					$mail->addBCC('[email protected]');

					$mail->addAttachment('/var/tmp/file.tar.gz');                               // Add attachments
					$mail->addAttachment('/tmp/image.jpg', 'new.jpg');                   // Optional name
					$mail->isHTML(true);                                                                  // Set email format to HTML

					$mail->Subject = 'Here is the subject';
					$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
					$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

					if(!$mail->send()) {
    					echo 'Message could not be sent.';
    					echo 'Mailer Error: ' . $mail->ErrorInfo;
					} else {
   					 echo 'Message has been sent';
						}

						}
					?>

                    <form name="sentMessage" id="contactForm" novalidate>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <input type="text" class="form-control" placeholder="Your Name *" id="name" required data-validation-required-message="Please enter your name.">
                                    <p class="help-block text-danger"></p>
                                </div>
                                <div class="form-group">
                                    <input type="email" class="form-control" placeholder="Your Email *" id="email" required data-validation-required-message="Please enter your email address.">
                                    <p class="help-block text-danger"></p>
                                </div>
                                <div class="form-group">
                                    <input type="tel" class="form-control" placeholder="Your Phone *" id="phone" required data-validation-required-message="Please enter your phone number.">
                                    <p class="help-block text-danger"></p>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <textarea class="form-control" placeholder="Your Message *" id="message" required data-validation-required-message="Please enter a message."></textarea>
                                    <p class="help-block text-danger"></p>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="col-lg-12 text-center">
                                <div id="success"></div>
                                <button type="submit" class="btn btn-xl">Send Message</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

So far yan pa lang po yung nagagawa but no luck for me nothing happens after ko mag send ng email sana po may makatulong still in learning progress pa lang po ako.

Anong error?
 
Madami kasing kulang sa code mo.. Walang "name" ang mga inputs mo.. Then sa form walang "method"..

Try mo yung naka attach.. gmail ang nakaset sa Host. Palitan mo nalang ng yahoo. Pero kung ayaw sa yahoo, itry mo sa gmail. Working sakin yan.

Sana makatulong... ;)
 

Attachments

  • sample Sending Email.rar
    18.4 KB · Views: 13
Madami kasing kulang sa code mo.. Walang "name" ang mga inputs mo.. Then sa form walang "method"..

Try mo yung naka attach.. gmail ang nakaset sa Host. Palitan mo nalang ng yahoo. Pero kung ayaw sa yahoo, itry mo sa gmail. Working sakin yan.

Sana makatulong... ;)

Warning: require_once(class.smtp.php): failed to open stream: No such file or directory in C:\xampp\htdocs\sampleSendingEmail\class\class.phpmailer.php on line 702

Fatal error: require_once(): Failed opening required 'class.smtp.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\sampleSendingEmail\class\class.phpmailer.php on line 702


sir my error po :(
View attachment 269046

View attachment 269047
 

Attachments

  • ss.png
    ss.png
    7.2 KB · Views: 4
  • ss2.png
    ss2.png
    3.4 KB · Views: 6
Last edited:
Back
Top Bottom