Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 02:58

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



If Abfrage nach Email Send.

Discussion on If Abfrage nach Email Send. within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Skyui's Avatar
 
elite*gold: 15
Join Date: May 2013
Posts: 1,718
Received Thanks: 245
If Abfrage nach Email Send.

Wie kann man eine If Abfrage machen, wenn die Email versendet wurde?

PHP Code:
mail($an$betreff$comment"From: $from"); 

Danke
Skyui is offline  
Old 08/24/2013, 15:44   #2

 
Synatex's Avatar
 
elite*gold: 25
Join Date: Apr 2010
Posts: 1,009
Received Thanks: 316
Den Rückgabewert von mail() in ner Variable speichern. Mail gibt true zurück wenn die Mail verschickt wurde, false wenn nicht. Wobei true nicht auch automatisch heißt das sie wirklich ankommt.

PHP Code:
<?php
$mail 
mail();

if(
$mail) {
echo 
'mail verschickt';
} else {
echo 
'Fehler';
}
?>
Synatex is offline  
Thanks
1 User
Old 08/24/2013, 15:55   #3
 
Skyui's Avatar
 
elite*gold: 15
Join Date: May 2013
Posts: 1,718
Received Thanks: 245
Danke,

es ist halt so, das ich PHP und Html Script in der selbe index.php Seite rein schrieb. Jetzt zeigt er mir dauerhaft true an..
Gibst dafür eine lösung?
Skyui is offline  
Old 08/24/2013, 16:05   #4
 
xMikasa's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 81
Received Thanks: 10
Mail() gibt immer dann True wieder wenn die angegebene Email das richtige Format eben einer Email Adresse hat(). Und wie oben schon geschrieben muss das nicht heißen das es die richtige Email der Person geschweigenden irgendeiner Person ist und auch nicht das die Email da angekommen ist wo sie ankommen sollte, also ist die Prüfung ziemlich sinnlos. Und da ich nicht weiß in welchem Kontext sich dein Code befindet kann ich auch keine alternative Lösung anbieten.

Logische Erklärungen zu PHP Funktionen findest du immer im PHP Manual. Für die mail() Funktion ist das zB diese Seite:
xMikasa is offline  
Thanks
1 User
Old 08/24/2013, 16:12   #5
 
Skyui's Avatar
 
elite*gold: 15
Join Date: May 2013
Posts: 1,718
Received Thanks: 245
Gibt es den keine Möglichkeit, nachdem man auf dem Absenden Button geklickt hat, automatisch auf der selbe index Seite eine Meldung ausgegeben wird?
Skyui is offline  
Old 08/24/2013, 16:24   #6
 
xMikasa's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 81
Received Thanks: 10
Wenn nur die Meldung ohne Versicherung das die Mail ankommt aufgezeigt werden soll, einfach mit der If Abfrage eine ausgeben lassen.

PHP Code:
if (@mail($empfaenger$betreff$nachricht,
        
$header) === true) {
        echo 
'Die E-Mail wurde erfolgreich versendet';
    } else {
        echo 
'Die E-Mail konnten nicht versendet werden';
    } 
xMikasa is offline  
Thanks
1 User
Old 08/24/2013, 16:49   #7
 
Skyui's Avatar
 
elite*gold: 15
Join Date: May 2013
Posts: 1,718
Received Thanks: 245
Danke, will aber bei mir nicht funktionieren:

PHP Code:
if (@mail($an$betreff$comment"From: $from") === true)
{
echo 
"Die E-Mail wurde erfolgreich versendet";
}
else
{
echo 
"Die E-Mail konnten nicht versendet werden";

Mail wird versendet, aber es steht immer true...
Skyui is offline  
Old 08/24/2013, 17:07   #8
 
Mikesch01's Avatar
 
elite*gold: 203
Join Date: Sep 2007
Posts: 732
Received Thanks: 190
Hast einen Screenshot davon zur Verfügung? Dann könnten wir das visuell auch auffassen.
Mikesch01 is offline  
Old 08/24/2013, 20:03   #9

 
Synatex's Avatar
 
elite*gold: 25
Join Date: Apr 2010
Posts: 1,009
Received Thanks: 316
Ohne den restlichen Code können wir nichts beantworten, wir haben keine Glaskugeln und können nicht in deinen Kopf schauen
Synatex is offline  
Reply


Similar Threads Similar Threads
There's no point to send email to EA.
06/30/2013 - Need for Speed World - 12 Replies
So, I sent email that I would get my account back and shit and this is their reply: Terms of Service Correspondence will follow shortly. Regards‏ Dear Kenter5500, Product Name: NFSW Email address: [email protected]
WTS WOTLK *EU* Original - 10€ - Instant send via email
08/27/2011 - World of Warcraft Trading - 0 Replies
Hi all, want to sell WOTLK *EU* version original, bought at gamestop shop (italy), near my house, that failed. Avaible: 7 keys Payment via PayPal. You can ask me any kind of information if you don't trust me. Instant send via Email. Bye :)
hilfe bei email send tool
11/06/2010 - General Coding - 0 Replies
hallo leute (jakefrost) ich wollte ein email send tool machen jakefrost weis warum das beschwerde tool egal auf jeden fall is da wss falsch es ist in vb geschrieben bitte um hilfe hier source:Imports System.Net.Mail Public Class Form1 Public Sub sendmail() Dim emailmessage As MailMessage = New MailMessage emailmessage.From = New MailAddress("[email protected]") emailmessage.To.Add(TextBox2.Text)
How to send an Anonymous Email !
07/04/2006 - Tutorials - 2 Replies
There are several web based utilities that allow this, but each one registers the ip info in the headers which allows tracing. They also will not allow you to use a proxy and utilize their service. This is for security reasons. My definition of anonymous includes the email addresses appearing as if they have been sent from whatever address you specify as well as no accurate record of your IP in the headers of the mail that could be traced back to you. The method that follows supports my...



All times are GMT +2. The time now is 02:58.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.