WebWork Magazin - Webseiten erstellen lassen, Online Medien, html

Webhoster, Webhosting Provider und Domain registrieren

Home | Registrieren | Einloggen | Suchen | Aktuelles | GSL-Webservice | Suleitec Webhosting
Reparatur-Forum | Elektro forum | Ersatzteilshop Haushalt und Elektronik



Im Homepage und Webhosting-Forum --- ecard verschicken per mail script

Scripte und Programme für PHP, MYSQL. Diskussionen zur Programmierung im Web. Fragen zu CMS, Blogsoftware, Shops, Newsletter und vielen weiteren Scripten.

Forum » PHP & MySQL » ecard verschicken per mail script - 27 Juli 2024 Antworten
ecard verschicken per mail script
weisseweste
Fachidiot
Threadstarter




Beiträge: 112

Hi,
ich suche ein script, mit dem ich jeweils ein Bild als Postcard verschicken kann.
Das Bild erscheint in einer extra htm Seite. Es sollte einfach nur "dieses Bild als Postcard verschicken" darunter als Text stehen und nur das nötigste: email Absender/Empfänger und Grußtext, als Eingabe fordern.
Ach ja, ... das Bild sollte mit der email verschickt werden und nicht irgendwo abgerufen werden.

Wer kennt eines?

danke weisseweste

  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

da haste dir was lustiges ausgedacht. Such mal bei Google nach "PHP HTML-Mails" und "php mail Anhänge" oder so ähnlich. ist nicht zu einfach

  Profil   Editieren   Zitieren
weisseweste
Fachidiot
Threadstarter




Beiträge: 112

ok ok, ..... sieht sehr komplex aus....

aber muß es denn php sein?
geht es nicht vielleicht mit formmail ... oder so, ....
man klickt auf "Dieses Bild versenden", dann geht das e-mail Fenster auf und automatisch trägt sich das Bild (Bildname) als Attachment oder noch besser inside email.
Man kann doch auch die Betreffzeilen und Textinhalte für eine email vorgeben. Vielleicht geht das ja auch mit Bildern???
Wäre jedenfalls klasse.

Diese Nachricht wurde geändert von: weisseweste
  Profil   Editieren   Zitieren
Can
Halbgott




Beiträge: 1324

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
39: 
40: 
41: 
42: 
43: 
44: 
45: 
46: 
47: 
48: 
49: 
50: 
51: 
52: 
53: 
54: 
55: 
56: 
57: 
58: 
59: 
60: 
61: 
62: 
63: 
64: 
65: 
66: 
67: 
68: 
69: 
70: 
71: 
72: 
73: 
74: 
75: 
76: 
77: 
78: 
79: 
80: 
81: 
82: 
83: 
84: 
85: 
86: 
87: 
88: 
89: 
90: 
91: 
92: 
93: 
94: 
95: 
96: 
97: 
98: 
99: 
100: 
101: 
102: 
103: 
104: 
105: 
106: 
107: 
108: 
109: 
110: 
111: 
112: 
113: 
114:

 *  Modified by Tobias Ratschiller :
 *      - General code clean-up
 *      - separate body- and from-property
 *      - killed some mostly un-necessary stuff
 */

class mime_mail
 {
 var $parts;
 var $to;
 var $from;
 var $headers;
 var $subject;
 var $body;

  /*
  *     void mime_mail()
  *     class constructor
  */
 function mime_mail()
  {
  $this->parts = array();
  $this->to =  "";
  $this->from =  "";
  $this->subject =  "";
  $this->body =  "";
  $this->headers =  "";
  }

  /*
  *     void add_attachment(string message, [string name], [string ctype])
  *     Add an attachment to the mail object
  */
 function add_attachment($message, $name =  "", $ctype =  "application/octet-stream")
  {
  $this->parts[] = array (
                           "ctype" => $ctype,
                           "message" => $message,
                           "encode" => $encode,
                           "name" => $name
                          );
  }

/*
 *      void build_message(array part=
 *      Build message parts of an multipart mail
 */
function build_message($part)
 {
 $message = $part[ "message"];
 $message = chunk_split(base64_encode($message));
 $encoding =  "base64";
 return  "Content-Type: ".$part[ "ctype"].
                        ($part[ "name"]? "; name = \"".$part[ "name"]. "\"" :  "").
                         "\nContent-Transfer-Encoding: $encoding\n\n$message\n";
 }

/*
 *      void build_multipart()
 *      Build a multipart mail
 */
function build_multipart()
 {
 $boundary =  "b".md5(uniqid(time()));
 $multipart =  "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME encoded message.\n\n--$boundary";

 for($i = sizeof($this->parts)-1; $i >= 0; $i--)
    {
    $multipart .=  "\n".$this->build_message($this->parts[$i]). "--$boundary";
    }
 return $multipart.=  "--\n";
 }

/*
 *      void send()
 *      Send the mail (last class-function to be called)
 */
function send()
 {
 $mime =  "";
 if (!empty($this->from))
    $mime .=  "From: ".$this->from. "\n";
 if (!empty($this->headers))
    $mime .= $this->headers. "\n";

 if (!empty($this->body))
    $this->add_attachment($this->body,  "",  "text/plain");
 $mime .=  "MIME-Version: 1.0\n".$this->build_multipart();
 mail($this->to, $this->subject,  "", $mime);
 }
};  // end of class

/*
 * Example usage
 *

 $attachment = fread(fopen("test.jpg", "r"), filesize("test.jpg"));

 $mail = new mime_mail();
 $mail->from = "foo@bar.com";
 $mail->headers = "Errors-To: foo@bar.com";
 $mail->to = "bar@foo.com";
 $mail->subject = "Testing...";
 $mail->body = "This is just a test.";
 $mail->add_attachment("$attachment", "test.jpg", "image/jpeg");
 $mail->send();

 */
?>


---
"S-púrlawits'chkâ A-ngáse gûrewüdíx" - Zaphrot Bibelprox

  Profil   E-Mail   Editieren   Zitieren
Marcus
Forenheld




Beiträge: 880

Wenn du einen Rootserver hast und SSI ohne Restriktionen drauf hast kannst du auch direkt per mail eine Email verschicken, siehe dazu auch hier:

http://www.webwork-community.net/posting2912_46_0.html

  Profil   E-Mail   Editieren   Zitieren
 

Antworten
Forum » PHP & MySQL » ecard verschicken per mail script

Aktuelle Beiträge zur Hilfe im Forum für Homepage - ecard verschicken per mail script im Forum Homepage Hosting AntwortenLetztes Posting
Rangliste (Ohne Mysql) (Kompliziertes Ordner System)
in "PHP & MySQL"
3 19.07.2021 06:00 von newtopblog
kleines problem mit phpadmin
in "PHP & MySQL"
5 11.04.2021 22:22 von Zavylon
Counter mit PHP
in "PHP & MySQL"
4 22.03.2021 16:29 von Robeni
Fehlermeldung beim Importieren der Datenbank in phpmyadmin
in "PHP & MySQL"
0 02.08.2019 22:14 von iFuchs
CMS für Online Shop
in "PHP & MySQL"
18 26.05.2019 13:29 von raiserle
Regestrierungproblem
in "PHP & MySQL"
3 28.11.2018 13:20 von norbertofahey
PHP Datum ausgeben?
in "PHP & MySQL"
1 19.10.2018 10:04 von Klaus1973
PHP befehl ausführen
in "PHP & MySQL"
11 16.08.2018 09:08 von Klaus1973
Visual Composer selber programmieren?
in "PHP & MySQL"
0 22.01.2017 23:45 von Redji
php preg_replace_callback für dynamischen Link
in "PHP & MySQL"
0 05.07.2016 11:02 von Rm21
PHP Code verschlüsseln
in "PHP & MySQL"
20 21.02.2016 21:25 von Kilian1
migrierter WP-Blog läuft nicht ...
in "PHP & MySQL"
0 04.02.2016 02:01 von Oxygon
Fertige PHP Scripte für Ihre Homepage
in "PHP & MySQL"
0 16.12.2015 12:02 von PHP-Script-Shop



Besucher : 8060686    Heute : 873     Gestern : 1088     Online : 52     27.7.2024    12:59      1 Besucher in den letzten 60 Sekunden        
alle 60.00 Sekunden ein neuer Besucher
Nach oben