Jump to content

vetals

Newbie
  • Posts

    5
  • Joined

  • Last visited

vetals's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Я попробовал! Друг помог разобраться по твоему совету! Все получилось - все работает - я доволен! Я благодарю тебя! Желаю тебе богатства и процветания!
  2. имелось в виду чтобы я код который выложил в тему из него убрал свою почту) спасибо тебе большое! буду пробовать! думаю что-то получится)
  3. Cайт - обычный лендинг - 1 страница. <!DOCTYPE html><html class="no-js" lang="ru" style="height: 100%"> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>********</title></head><body style="height: 100%"><?phperror_reporting(E_ALL);require_once( 'mandrill/Mandrill.php' ); function mandrill_mail($message){if(is_array($message)&&isset($message['to'])){try{$mandrill = new Mandrill();return $mandrill->messages->send($message, false, NULL, NULL);}catch(Mandrill_Error $e) { // Mandrill errors are thrown as exceptions echo 'A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage(); // A mandrill error occurred: Mandrill_Unknown_Subaccount - No subaccount exists with the id 'customer-123' return false; } }} function output_err($num){ echo '<div class="error-message-empty">Имя и телефон обязательные поля.</div>'; exit();}function complete_mail() { header('Content-Type: charset=utf-8'); $title = substr(htmlspecialchars(trim($_POST['send_name'])), 0, 1000); $mess = substr(htmlspecialchars(trim($_POST['send_phone'])), 0, 1000); $str = "<strong>Имя - </strong>" . $title . ", <strong>Email - </strong>" . $mess . "<br />"; #final_str = clearstr($str); $headers = 'From: Admin <>' . "\r\n"; $headers .= "Content-type: text/html; charset=\"utf-8\"";$msg = array('html' => $str, 'subject' => $title, 'from_email' => '', 'from_name' => 'Admin', 'to' => array( array( 'email' => '', 'name' => '', 'type' => 'to' ) ), 'headers' => array(), 'important' => false, 'track_opens' => null, 'track_clicks' => null, 'auto_text' => true, 'auto_html' => null, 'inline_css' => null, 'url_strip_qs' => null, 'preserve_recipients' => false, 'view_content_link' => null, 'tracking_domain' => null, 'signing_domain' => null, 'return_path_domain' => null, 'merge' => true,); $mail_result = mandrill_mail($msg);} function clearstr($string){ $string = str_replace(' ', '-', $string); $string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); return preg_replace('/-+/', '-', $string);} complete_mail(); if (isset($_POST['submit'])) complete_mail();?><div class="preim" style="height: 100%;background-repeat: repeat;"> <p class="center" style="margin: 500px">Ожидайте, я с Вами свяжусь.</p></div></body></html> попробую -спасибо
  4. подскажите а как это сделать? или какую-нибудь инфу по этой теме? буду вам благодарен
  5. На сайте есть форма заявки с 1 полем (введите ваш email) и кнопкой "отправить" Вот мой код в файле index: <div id="form_container"> <p style="font-size:24px; color:#FFF; position:relative; top:50px; margin:0 0 0 335px; text-align:center; width:300px;"> <br/> Пожалуйста, введите <br/> Ваш e-mail и мы<br/>сразу начнем работу</p> <div id="forma_1"> <form method="post" action="action.php"> <input id="form_text" type="text" name="send_phone" placeholder="Ваш Email" class=”required” required="required"/> <input type="submit" name="ok1" value="" class="ok"/></form></p> </div> </div></div> Нужно сделать чтобы на почту приходило письмо с меткой ( например, заказ1 или заказ10 - чтобы я мог различить)Нашел код который думаю можно вставить он здесь http://htmlbook.ru/samhtml5/formy/skrytoe-poleПытался сам вставлять код но ничего не получилось(Может кто подскажет как решить эту проблему?Буду очень благодарен
×
×
  • 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. See more about our Guidelines and Privacy Policy