Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
opt /
lampp /
htdocs /
dashboard /
docs /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxrwxr-x
access-phpmyadmin-remotely.html
5.68
KB
-rwxrwxr-x
access-phpmyadmin-remotely.pdf
33.56
KB
-rwxrwxr-x
access-phpmyadmin-remotely.pdfmarks
212
B
-rwxrwxr-x
activate-use-xdebug.html
8.28
KB
-rwxrwxr-x
activate-use-xdebug.pdf
111.94
KB
-rwxrwxr-x
activate-use-xdebug.pdfmarks
201
B
-rwxrwxr-x
auto-start-xampp.html
5.08
KB
-rwxrwxr-x
auto-start-xampp.pdf
30.34
KB
-rwxrwxr-x
auto-start-xampp.pdfmarks
194
B
-rwxrwxr-x
backup-restore-mysql.html
13.96
KB
-rwxrwxr-x
backup-restore-mysql.pdf
302.87
KB
-rwxrwxr-x
backup-restore-mysql.pdfmarks
220
B
-rwxrwxr-x
change-mysql-temp-dir.html
5.04
KB
-rwxrwxr-x
change-mysql-temp-dir.pdf
8.05
KB
-rwxrwxr-x
change-mysql-temp-dir.pdfmarks
220
B
-rwxrwxr-x
configure-use-tomcat.html
9.58
KB
-rwxrwxr-x
configure-use-tomcat.pdf
205.46
KB
-rwxrwxr-x
configure-use-tomcat.pdfmarks
209
B
-rwxrwxr-x
configure-vhosts.html
10.17
KB
-rwxrwxr-x
configure-vhosts.pdf
100.74
KB
-rwxrwxr-x
configure-vhosts.pdfmarks
201
B
-rwxrwxr-x
configure-wildcard-subdomains.html
10.42
KB
-rwxrwxr-x
configure-wildcard-subdomains.pdf
94.48
KB
-rwxrwxr-x
configure-wildcard-subdomains.pdfmarks
213
B
-rwxrwxr-x
create-framework-project-zf1.html
8.65
KB
-rwxrwxr-x
create-framework-project-zf1.pdf
64.71
KB
-rwxrwxr-x
create-framework-project-zf1.pdfmarks
214
B
-rwxrwxr-x
create-framework-project-zf2.html
9.67
KB
-rwxrwxr-x
create-framework-project-zf2.pdf
137
KB
-rwxrwxr-x
create-framework-project-zf2.pdfmarks
214
B
-rwxrwxr-x
deploy-git-app.html
8.68
KB
-rwxrwxr-x
deploy-git-app.pdf
120.71
KB
-rwxrwxr-x
deploy-git-app.pdfmarks
209
B
-rwxrwxr-x
increase-php-file-upload-limit.html
4.99
KB
-rw-rwxr--
increase-php-file-upload-limit.pdf
9.54
KB
-rw-rwxr--
increase-php-file-upload-limit.pdfmarks
212
B
-rw-rwxr--
install-wordpress.html
11.77
KB
-rw-rwxr--
install-wordpress.pdf
582.05
KB
-rw-rwxr--
install-wordpress.pdfmarks
212
B
-rw-rwxr--
read-write-htdocs.html
6.46
KB
-rw-rwxr--
read-write-htdocs.pdf
62.02
KB
-rw-rwxr--
read-write-htdocs.pdfmarks
244
B
-rw-rwxr--
reset-mysql-password.html
6.38
KB
-rw-rwxr--
reset-mysql-password.pdf
54.64
KB
-rw-rwxr--
reset-mysql-password.pdfmarks
215
B
-rw-rwxr--
send-mail.html
13.72
KB
-rw-rwxr--
send-mail.pdf
90.26
KB
-rw-rwxr--
send-mail.pdfmarks
196
B
-rw-rwxr--
transfer-files-ftp.html
8.27
KB
-rw-rwxr--
transfer-files-ftp.pdf
159.85
KB
-rw-rwxr--
transfer-files-ftp.pdfmarks
198
B
-rw-rwxr--
troubleshoot-apache.html
6.19
KB
-rw-rwxr--
troubleshoot-apache.pdf
45.32
KB
-rw-rwxr--
troubleshoot-apache.pdfmarks
214
B
-rw-rwxr--
use-different-php-version.html
9.62
KB
-rw-rwxr--
use-different-php-version.pdf
143.6
KB
-rw-rwxr--
use-different-php-version.pdfmarks
205
B
-rw-rwxr--
use-sqlite.html
9.18
KB
-rw-rwxr--
use-sqlite.pdf
103.5
KB
-rw-rwxr--
use-sqlite.pdfmarks
196
B
-rw-rwxr--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : send-mail.html
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <!-- Always force latest IE rendering engine or request Chrome Frame --> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <!-- Use title if it's in the page YAML frontmatter --> <title>Send Mail with PHP</title> <link href="/dashboard/stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" /> <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script> <link href="/dashboard/images/favicon.png" rel="icon" type="image/png" /> </head> <body class="docs docs_send-mail"> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <header class="header contain-to-grid"> <nav class="top-bar" data-topbar> <ul class="title-area"> <li class="name"> <h1><a href="/dashboard/index.html">Apache Friends</a></h1> </li> <li class="toggle-topbar menu-icon"> <a href="#"> <span>Menu</span> </a> </li> </ul> <section class="top-bar-section"> <!-- Left Nav Section --> <ul class="left"> <li class="item "><a href="/dashboard/faq.html">FAQs</a></li> <li class="item active"><a href="/dashboard/howto.html">HOW-TO Guides</a></li> <li class="item "><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li> <li class="item "><a href="/phpmyadmin/">phpMyAdmin</a></li> </ul> </section> </nav> </header> <div class="wrapper"> <div class="hero"> <div class="row"> <div class="large-12 columns"> <h1>Documentation</h1> </div> </div> </div> <div class="row"> <div class="large-12 columns"> <ul class="sub-nav"> <li> <a class="pdf" target="_blank" href="/dashboard/docs/send-mail.pdf"> Download PDF <span>send-mail.pdf</span> </a> </li> </ul> <article class="asciidoctor"> <aside> <h3>Contents</h3> <ol class="sections"> <li><a href="/dashboard/docs/send-mail.html#use_pear_mail">Use PEAR Mail</a></li> <li><a href="/dashboard/docs/send-mail.html#use_msmtp">Use msmtp</a></li> <li><a href="/dashboard/docs/send-mail.html#use_phpmailer">Use PHPMailer</a></li> </ol> </aside> <h1>Send Mail with PHP</h1> <div id="preamble"> <div class="sectionbody"> <div class="paragraph"> <p>If you’re a PHP application developer, you might need to send email notifications through your custom PHP applications. With XAMPP, there are three ways to do this: you can use the PEAR Net_SMTP and Mail packages, you can use a simple SMTP client like <a href="http://msmtp.sourceforge.net/">msmtp</a>, or you can use the third-party <a href="http://phpmailer.worxware.com/">PHPMailer</a> class. This guide walks you through these options.</p> </div> <div class="admonitionblock note"> <table> <tr> <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> <td class="content"> This guide assumes that you have an existing Gmail account, and that you will use Gmail’s SMTP server to transmit email. You can also use your organization or ISP’s mail server, although you’ll need to replace key details, such as the SMTP server name and port, with appropriate values for your environment. Your network administrator or ISP support desk will typically be able to provide this information. The example code provided in this tutorial is illustrative only and should not be used in production environments. </td> </tr> </table> </div> </div> </div> <div class="sect1"> <h2 id="_use_pear_mail">Use PEAR Mail</h2> <div class="sectionbody"> <div class="paragraph"> <p>To configure XAMPP to use the PEAR Mail and Net_SMTP packages for email notifications, follow these steps:</p> </div> <div class="olist arabic"> <ol class="arabic"> <li> <p>Install the Mail and Net_SMTP PEAR modules:</p> <div class="literalblock"> <div class="content"> <pre>pear install Net_SMTP Mail</pre> </div> </div> <div class="paragraph"> <p>Note that if these packages are already installed in your system you see the messages below when executing that command:</p> </div> <div class="literalblock"> <div class="content"> <pre>Ignoring installed package pear/Net_SMTP Ignoring installed package pear/Mail Nothing to install</pre> </div> </div> </li> <li> <p>Use your text editor to create an example script named <em>sendmail.php</em> in the <em>htdocs/</em> subdirectory and fill it with the following code. Once done, save your changes.</p> <div class="literalblock"> <div class="content"> <pre><?php require_once "Mail.php"; $from = "your-gmail-username@gmail.com"; $to = 'recipients@email-address.com'; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = 'your-gmail-username@gmail.com'; $password = 'your-gmail-password'; $subject = "test"; $body = "test"; $headers = array ('From' => $from, 'To' => $to,'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo($mail->getMessage()); } else { echo("Message successfully sent!\n"); } ?></pre> </div> </div> <div class="paragraph"> <p>Remember to replace the dummy values shown with your actual Gmail address, password and recipient email address. For this simple test, use your own email address as the recipient address.</p> </div> </li> </ol> </div> <div class="paragraph"> <p>Now, browse to the URL <a href="http://localhost/sendmail.php" class="bare">http://localhost/sendmail.php</a> to execute the script and send the email message. If all goes well, you should see a success notification in your browser. If you used your own email address for the recipient address, you should also receive the email message.</p> </div> </div> </div> <div class="sect1"> <h2 id="_use_msmtp">Use msmtp</h2> <div class="sectionbody"> <div class="paragraph"> <p>To configure XAMPP to use <em>msmtp</em> for email notifications, follow these steps:</p> </div> <div class="olist arabic"> <ol class="arabic"> <li> <p>Ensure that you are logged in as <em>root</em>. Install the <em>msmtp</em> package.</p> <div class="literalblock"> <div class="content"> <pre>apt-get install msmtp</pre> </div> </div> </li> <li> <p>Create a new file at <em>/etc/msmtprc</em> and fill it with the following configuration directives:</p> <div class="literalblock"> <div class="content"> <pre>defaults tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt account default host smtp.gmail.com port 587 auth on user your-gmail-username@gmail.com password your-gmail-password from your-gmail-username@gmail.com logfile /var/log/msmtp.log</pre> </div> </div> <div class="paragraph"> <p>Remember to replace the dummy values shown with your actual Gmail address and account password.</p> </div> </li> <li> <p>Restart the Apache server using the XAMPP control panel.</p> </li> </ol> </div> <div class="admonitionblock tip"> <table> <tr> <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> <td class="content"> For more information on configuring msmtp to work with Gmail, refer to <a href="http://www.absolutelytech.com/2010/07/17/howto-configure-msmtp-to-work-with-gmail-on-linux/">this source thread</a> or <a href="http://msmtp.sourceforge.net/doc/msmtp.html">the msmtp documentation</a>. </td> </tr> </table> </div> <div class="paragraph"> <p>You can now use PHP’s <em>mail()</em> function to send email from your application. To illustrate how it can be used with your Gmail account, use your text editor to create an example script named <em>sendmail.php</em> in the <em>htdocs/</em> subdirectory and fill it with the following code. Once done, save your changes.</p> </div> <div class="literalblock"> <div class="content"> <pre><?php $to = 'recipients@email-address.com'; $subject = 'Hello from XAMPP!'; $message = 'This is a test'; $headers = "From: your@email-address.com\r\n"; if (mail($to, $subject, $message, $headers)) { echo "SUCCESS"; } else { echo "ERROR"; }</pre> </div> </div> <div class="paragraph"> <p>Remember to replace the dummy values shown with valid email addresses. For this simple test, use your own email address as the recipient address.</p> </div> <div class="paragraph"> <p>Now, browse to the URL <a href="http://localhost/sendmail.php" class="bare">http://localhost/sendmail.php</a> to execute the script and send the email message. If all goes well, you should see a success notification in your browser. If you used your own email address for the recipient address, you should also receive the email message.</p> </div> <div class="imageblock"> <div class="content"> <img src="./images/send-mail/image1.png" alt="image1"> </div> </div> </div> </div> <div class="sect1"> <h2 id="_use_phpmailer">Use PHPMailer</h2> <div class="sectionbody"> <div class="paragraph"> <p>To configure XAMPP to use PHPMailer for email notifications, follow these steps:</p> </div> <div class="olist arabic"> <ol class="arabic"> <li> <p>Download PHPMailer from its Github repository using the "Download Zip" button.</p> <div class="imageblock"> <div class="content"> <img src="./images/send-mail/image2.png" alt="image2"> </div> </div> </li> <li> <p>Create a directory for your new application within the <em>htdocs/</em> subdirectory of your XAMPP installation directory. In this tutorial, the application directory is named <em>example/</em>.</p> </li> <li> <p>Extract the contents of the PHPMailer ZIP archive to the application directory.</p> </li> </ol> </div> <div class="paragraph"> <p>You can now use PHPMailer to send email from your application. To illustrate how it can be used with your Gmail account, use your text editor to create an example script named <em>phpmailer.php</em> in the application directory, and fill it with the following code. Once done, save your changes.</p> </div> <div class="literalblock"> <div class="content"> <pre><?php require 'PHPMailer-master/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPSecure = 'tls'; $mail->SMTPAuth = true; $mail->Host = 'smtp.gmail.com'; $mail->Port = 587; $mail->Username = 'your-gmail-username@gmail.com'; $mail->Password = 'your-gmail-password'; $mail->setFrom('your@email-address.com'); $mail->addAddress('recipients@email-address.com'); $mail->Subject = 'Hello from PHPMailer!'; $mail->Body = 'This is a test.'; //send the message, check for errors if (!$mail->send()) { echo "ERROR: " . $mail->ErrorInfo; } else { echo "SUCCESS"; }</pre> </div> </div> <div class="paragraph"> <p>Remember to replace the dummy values shown with your actual Gmail address and account password. You should also use a valid sender and recipient address. For this simple test, use your own email address as the recipient address.</p> </div> <div class="paragraph"> <p>Now, browse to the URL <a href="http://localhost/example/phpmailer.php" class="bare">http://localhost/example/phpmailer.php</a>. This should execute the script and send the email message. If all goes well, you should see a success notification in your browser. If you used your own email address for the recipient address, you should also receive the email message.</p> </div> <div class="imageblock"> <div class="content"> <img src="./images/send-mail/image3.png" alt="image3"> </div> </div> <div class="admonitionblock note"> <table> <tr> <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> <td class="content"> As a security precaution, Gmail will automatically rewrite the From: and Reply-to: headers in your email message to reflect your Gmail address. If you want to avoid this, you must add and validate your custom email address in your Gmail account as a sender. Refer to <a href="https://support.google.com/mail/answer/22370?hl=en">Gmail’s documentation for more information and important restrictions</a>. </td> </tr> </table> </div> </div> </div> </article> </div> </div> </div> <footer class="footer row"> <div class="columns"> <div class="footer_lists-container row collapse"> <div class="footer_social columns large-2"> <ul class="social"> <li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li> <li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li> </ul> <p class="footer_copyright">Copyright (c) 2022, Apache Friends</p> </div> <ul class="footer_links columns large-9"> <li><a href="https://www.apachefriends.org/blog.html">Blog</a></li> <li><a href="/privacy_policy.html">Privacy Policy</a></li> <li> <a target="_blank" href="http://www.fastly.com/"> CDN provided by <img width="48" data-2x="/dashboard/images/fastly-logo@2x.png" src="/dashboard/images/fastly-logo.png" /> </a> </li> </ul> </div> </div> </footer> <!-- JS Libraries --> <script src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script src="/dashboard/javascripts/all.js" type="text/javascript"></script> </body> </html>
Close