Advertisement
Guest User

Untitled

a guest
Jul 15th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', TRUE);
  4. ini_set('display_startup_errors', TRUE);
  5.  
  6. ob_start();
  7. include('mplookup.php');
  8. ob_end_clean();
  9. $email = $_POST['emailfrom'];
  10.  
  11. require_once "mail/Mail.php";
  12.  
  13. $from = "***********************";
  14.  
  15. $to = "************************";
  16. $subject = "Sisi's visit to the UK: Sent using the ERC's Tool";
  17. $text = $_POST['text'];
  18. $address = $_POST['address'];
  19. $city = $_POST['city'];
  20. $footer = '<br><em><strong>Disclaimer: "Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of EG4DEMUK.&nbsp; EG4DEMUK will not accept any liability in respect of defamatory or threatening communication. If you would like to raise a complaint about an email sent using our tool, please contact us at <a href="mailto:ercegypt.uk@ercegypt.org?subject=Email%20Complaint"></a>".</strong></em><p>-----------------------------------------------------------</p>
  21. The ERC is an organisation that brings together Egyptian citizens and movements abroad, irrespective of their political or ideological affiliations. We share in common a belief in the principles of the January 25th Revolution and oppose all aspects of corruption and dictatorship in Egypt. We believe in constitutional legitimacy and work for the establishment of a civil state that reflects the will of the Egyptian people and their freedom in choosing their government.</p>';
  22. $postcode = $_POST['postcode'];
  23. $name = $_POST['flname'];
  24.  
  25. $body = $text.$name."<br />".$address."<br />".$city."<br />".$postcode."<br />".$footer;
  26.  
  27. $host = "****************************************
  28. $port = "***";
  29. $username = "************************";
  30. $password = "**************";
  31.  
  32. $headers = array ('From' => $from,
  33. 'To' => $to,
  34. 'Subject' => $subject);
  35. 'MIME-Version' => "1.0",
  36. 'Content-type' => "text/html; charset=iso-8859-1rnrn");
  37. 'Reply-To' => $email,
  38. "BCC: ****************rn";
  39. "CC: $emailrn";
  40. $smtp = Mail::factory('smtp',
  41. array ('host' => $host,
  42. 'port' => $port,
  43. 'auth' => true,
  44. 'username' => $username,
  45. 'password' => $password));
  46.  
  47. $mail = $smtp->send($to, $headers, $body);
  48.  
  49. if (PEAR::isError($mail)) {
  50. echo("<p>" . $mail->getMessage() . "</p>");
  51. } else {
  52. echo("<p>Message successfully sent!</p>");
  53. }
  54.  
  55. <?php
  56. ob_start();
  57. include('mplookup.php');
  58. ob_end_clean();
  59. include("mail/Mail.php");
  60. /* mail setup recipients, subject etc */
  61. $recipients = "******************";
  62. $headers["From"] = "ercegypt.uk@ercegypt.org";
  63. $headers["To"] = "********************";
  64. $headers["Subject"] = "Sisi's visit to the UK: Sent using the ERC's Tool";
  65. $email = $_POST['emailfrom'];
  66. $human = $_POST['human'];
  67. $text = $_POST['text'];
  68. $address = $_POST['address'];
  69. $city = $_POST['city'];
  70. $footer = '<br><em><strong>Disclaimer: "Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of EG4DEMUK.&nbsp; EG4DEMUK will not accept any liability in respect of defamatory or threatening communication. If you would like to raise a complaint about an email sent using our tool, please contact us at <a href="mailto:ercegypt.uk@ercegypt.org?subject=Email%20Complaint"></a>".</strong></em><p>-----------------------------------------------------------</p>
  71. The ERC is an organisation that brings together Egyptian citizens and movements abroad, irrespective of their political or ideological affiliations. We share in common a belief in the principles of the January 25th Revolution and oppose all aspects of corruption and dictatorship in Egypt. We believe in constitutional legitimacy and work for the establishment of a civil state that reflects the will of the Egyptian people and their freedom in choosing their government.</p>';
  72. $postcode = $_POST['postcode'];
  73. $name = $_POST['flname'];
  74. $message = $text.$name."<br />".$address."<br />".$city."<br />".$postcode."<br />".$footer;
  75. /* SMTP server name, port, user/passwd */
  76. $smtpinfo["host"] = "******************************";
  77. $smtpinfo["port"] = "465";
  78. $smtpinfo["auth"] = true;
  79. $smtpinfo["username"] = "*******************";
  80. $smtpinfo["password"] = "**************";
  81. /* Create the mail object using the Mail::factory method */
  82. $mail_object =& Mail::factory("smtp", $smtpinfo);
  83. /* Ok send mail */
  84. if ($_POST['submit'] && $human == '4')
  85. {
  86. if ($mail_object->send($message,$headers))
  87. {
  88. echo '<p>Your message has been sent! Thank you for participating in EG4DEMUK's campaign.</p>';
  89. }
  90. else
  91. {
  92. echo '<p>Something went wrong, please go back and try again!</p>';
  93. }
  94. }
  95.  
  96. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement