Сорванец sendmessage php.

I have a kind of a quiz running soon, where the answers are shown and should be submitted via email. The script uses a sendmessage.php which runs fine for "answer one". All other answers, despite the pages being absolutely equal (except for the text) dont.

This is the correct page "one":


Der größte Fan

Du liebst alles, was mit Schönheit zu tun hat! Warum teilst du nicht deine Leidenschaft für Mary Kay® Produkte mit deiner Familie und deinen Freunden? Du kannst nicht verbergen, wie du dich damit fühlst – gepflegt, selbstbewusst und schön!

Ergebnis ans Mary Kay® Büro schicken

Schick uns dein Ergebnis Deine Consultantnummer
Dein Name & nbsp;
Deine Email
Mein Ergebnis lautet: Der größte Fan. Du liebst alles, was mit Schönheit zu tun hat! Warum teilst du nicht deine Leidenschaft für Mary Kay® Produkte mit deiner Familie und deinen Freunden? Du kannst nicht verbergen, wie du dich damit fühlst – gepflegt, selbstbewusst und schön! Email abschicken ()[\]\\.,;:\s@\"]+(\.[^()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[ {1,3}\.{1,3}\.{1,3}\.{1,3}\])|((+\.)+{2,}))$/; return reg.test(email); } $(document).ready(function() { $(".modalbox").fancybox(); $("#contact").submit(function() { return false; }); $("#send").on("click", function(){ var emailval = $("#email").val(); var msgval = $("#msg").val(); var msglen = msgval.length; var mailvalid = validateEmail(emailval); if(mailvalid == false) { $("#email").addClass("error"); } else if(mailvalid == true){ $("#email").removeClass("error"); } if(msglen < 4) { $("#msg").addClass("error"); } else if(msglen >= 4){ $("#msg").removeClass("error"); } if(mailvalid == true && msglen >wird verschickt...

The sendmesaage is as follows:

That combination works - all files in the same directory. When I use the second answer (two.html) - it doesnt do anything... it states that is was sent, but it will never arrive.


Die Netzwerkerin

Deine Freunde sind dir am wichtigsten. Deshalb ist für dich ein Geschäft perfekt, das es dir ermöglicht, mehr Zeit mit deinen Freundinnen zu verbringen und gleichzeitig neue Freundschaften aufzubauen.
Schick uns dein Ergebnis, und erhalte die Einladung zur Facebook-Gruppe!

Ergebnis ans Mary Kay® Büro schicken

Schick uns dein Ergebnis Deine Consultantnummer
Dein Name
Deine Email
Mein Ergebnis lautet: Die Netzwerkerin. Deine Freunde sind dir am wichtigsten. Deshalb ist für dich ein Geschäft perfekt, das es dir ermöglicht, mehr Zeit mit deinen Freundinnen zu verbringen und gleichzeitig neue Freundschaften aufzubauen. Email abschicken function validateEmail(email) { var reg = /^(([^()[\]\\.,;:\s@\"]+(\.[^()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[{1,3}\.{1,3}\.{1,3}\.{1,3}\])|((+\.)+{2,}))$/; return reg.test(email); } $(document).ready(function() { $(".modalbox").fancybox(); $("#contact").submit(function() { return false; }); $("#send").on("click", function(){ var emailval = $("#email").val(); var msgval = $("#msg").val(); var msglen = msgval.length; var mailvalid = validateEmail(emailval); if(mailvalid == false) { $("#email").addClass("error"); } else if(mailvalid == true){ $("#email").removeClass("error"); } if(msglen < 4) { $("#msg").addClass("error"); } else if(msglen >= 4){ $("#msg").removeClass("error"); } if(mailvalid == true && msglen >= 4) { // if both validate we attempt to send the e-mail // first we hide the submit btn so the user doesnt click twice $("#send").replaceWith("wird verschickt..."); $.ajax({ type: "POST", url: "sendmessage.php", data: $("#contact").serialize(), success: function(data) { if(data == "true") { $("#contact").fadeOut("fast", function(){ $(this).before("

Super! Deine Ergebnisse sind zu uns unterwegs! Vielen Dank:)

"); setTimeout("$.fancybox.close()", 5000); }); } } }); } }); });

If anyone has any suggestions, that would be awesome! Thanks in advance, Dimitri

Kids these days, I tell ya. All they care about is the technology. The video games. The bottled water. Oh, and the texting, always the texting. Back in my day, all we had was...OK, I had all of these things too. But I still don"t get the volume of texts that I hear my younger female cousins send. Thousands and thousands of them each month. WTF are all of these texts for? Here"s a thought:

omg i can"t believe you didn"t hear

jenny and mark were holding hands

ok i made it up, ur so lame

Riveting. Jokes aside, text messaging can be an extremely useful way to get out of calling that person you hate calling communicate quickly and efficiently. Many websites are now offering text message notifications instead of email notifications, which can be nice in the case of time-sensitive information. After a bit of research, I found out how easy it was so send text messages using PHP, so that I can integrate text messaging into my apps! Let me show you how!

The Methodology

Unbeknownst to me, sending text messages can be as easy as sendmail, because you can send your text to an email address and it will be delivered. There are two pieces of information you must know: the phone number and the carrier"s text message email domain. Needing to know the recipient"s carrier is not ideal, but necessary. Luckily Kevin Jensen has compiled a list of carriers and domains :

Phone companies have internal lookups for phone carriers but developers like you and I don"t get access to them, so knowing the carrier is a must. To send a text message, you email {phoneNumber}@{carrierDomain} .

The PHP

PHP"s provided method for sending emails is the mail function . Its usage is quite simple:

Bool mail (string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]])

Using the mail function and the text message email format, sending a text message is as easy as:

// Call Jenny mail("[email protected]", "", "Your packaged has arrived!", "From: David Walsh \r\n");

Note that no subject line is provided, and more importantly, a FROM header is within the last parameter so that the recipient knows where the text message has been sent from.

Who knew it was that easy? I always assumed text messaging had its own protocol and all that magic. Apparently not! Spend a few minutes playing around with text messaging yourself; it"s one of those things that"s both neat to do and useful!

Mixed CPosting::SendMessage( int ID,
int timeout = 0, int maxcount = 0,);

Нестатический метод отправляет выпуск в почтовую рассылку по адресам, указанным в таблице b_posting_email с соответствующим идентификатором выпуска. При этом обновляя статусы:

  • Y - еще не отправлялось
  • N - отправлено
  • Е - с ошибками
Выпуски со статусом "Успешно отправлен" повторно не отправляются. Если у выпуска установлен статус "Частично отправлен", то выпуск отправляется по оставшимся адресам.

Сначала выполняется попытка получения блокировки выпуска (см. CPosting::Lock). Если блокировку получить не удалось, то отправка считается частичной и возвращается "CONTINUE". Затем формируется тело письма для отправки и в цикле по адресам подписчиков осуществляется отправка выпуска с использованием функции bxmail .

В режиме отправки "Персонально каждому получателю" перед вызовом bxmail вызываются обработчики события BeforePostingSendMail.

В цикле отправки в очереди адресов делаются отметки об успешной отправке или ошибке.

С выпуска снимается блокировка(см. CPosting::UnLock).

Параметры Параметр Описание C версии
ID Идентификатор выпуска.
timeout Максимальное время отправки в секундах. При превышении этого времени прерывается работа и устанавливается статус выпуска "Частично отправлен". Параметр имеет значение только при методе отправки "Персонально каждому получателю". Если timeout=0, то отправка производится за один шаг. 3.2.0
maxcount Максимальное количество писем для отправки. При превышении этого количества прерывается работа и устанавливается статус выпуска "Частично отправлен". Параметр имеет значение только при методе отправки "Персонально каждому получателю". Если maxcount=0, то отправка производится за один шаг. 4.0.5
check_charset Сопоставлять текущую кодировку (константа LANG_CHARSET) с кодировкой в которой составлен выпуск или нет. Если кодировки не совпадают, то вернется "CONTINUE". Используется при отправке выпусков с помощью агентов. Сравнение выполняется без учета регистра кодировок. 8.0.1
Возвращаемые значения

Функция возвращает true при успешной отправке, false при неуспешной, "CONTINUE" при частичной отправке. При неуспешной отправке переменная LAST_ERROR класса содержит сообщение об ошибке.

См. также Пример использования