Search found 1663 matches: sendmail

Searched query: +sendmail

Return to advanced search

Re: PHP SMTP : each Bcc <email> into their own email Message

Nobbie wrote:The question is, how to determine "the own mail address". As you do not specify any From : sender in your mail() function call, the system uses the configuration of the sendmail configuration or of the SMTP server which is specified in php.ini

But this is NOT evaluated by PHP, the physical sending of the mail is done by the corresponding mail server and an address of the sender is applied by that mail server. You cannot easily evaluate the mail configuration in your PHP script.You can only specify your own From: clause in the 5th parameter of mail(), which overrides the default of the mail server and finally apply the same value to Bcc:



Actually let get it understood that all To From Email Values has been passed and SMTP Mail Server on Port 25 is working fine... Emails TO: to@gmail.com From: from@mydomain.com Bcc: bcc1@gmail.com, bcc2@gmail.com had receive successfully mails. Now, I again repeating:

The same Message would be derived to the all recements. I want to add in each recipients' Message should be contained their own Email Address

How?
by zahidaliayub
27. November 2021 15:28
 
Forum: XAMPP for Windows
Topic: PHP SMTP : each Bcc <email> into their own email Message
Replies: 12
Views: 14808

Re: PHP SMTP : each Bcc <email> into their own email Message

The question is, how to determine "the own mail address". As you do not specify any From : sender in your mail() function call, the system uses the configuration of the sendmail configuration or of the SMTP server which is specified in php.ini

But this is NOT evaluated by PHP, the physical sending of the mail is done by the corresponding mail server and an address of the sender is applied by that mail server. You cannot easily evaluate the mail configuration in your PHP script.You can only specify your own From: clause in the 5th parameter of mail(), which overrides the default of the mail server and finally apply the same value to Bcc:
by Nobbie
25. November 2021 10:28
 
Forum: XAMPP for Windows
Topic: PHP SMTP : each Bcc <email> into their own email Message
Replies: 12
Views: 14808

Re: mail.php work from terminal but not from web browser

Searching in internet and testing later, I see what in php.ini the senmail_path need "env -i" so the line now is: sendmail_path = "env -i /usr/sbin/sendmail -t -i"
Now the result is OK, but no mail is out (from terminal yes, the mail out to the inbox)
by cefer
26. May 2021 02:58
 
Forum: XAMPP for Linux
Topic: mail.php work from terminal but not from web browser
Replies: 2
Views: 6944

PHP mail() 10061<EOL>Connection refused

Hi, from and to addresses are the same. Why the connection is refused?

C:\xampp\sendmail\error
Code: Select all
21.02.03 10:11:19 : Socket Error # 10061<EOL>Connection refused.



Code: Select all
$header = "From: ...@gmail.com";
$to = "...@gmail.com";
$subject = "Subject";
$message = "Message";
$mail = mail($to, $subject, $message, $header);
var_dump($mail);



php.ini
Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP=localhost
; http://php.net/smtp-port
smtp_port=587                                                                                        ;    smtp_port=25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = ...@gmail.com                                                            ;    me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"                                                ;     dodałem

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header=Off



sendmail.ini
Code: Select all
[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.


;smtp_server=smtp.gmail.com                                                                                ;    smtp_server=mail.mydomain.com
smtp_server=127.0.0.1

; smtp port (normally 25)

smtp_port=587                                                                                                            ;    smtp_port=25

; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=mydomain.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

debug_logfile=debug.log                                                                                            ;    było zakomentowane

; if your smtp server requires authentication, modify the following two lines

auth_username=...@gmail.com                                                                            ;    dodałem wartość
auth_password=...                                                                                            ;    dodałem wartość

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines.  do not enable unless it is required.

pop3_server=
pop3_username=
pop3_password=

; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender=

; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify
; the "To: " header of the message content

force_recipient=

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting.  you can manually set the ehlo/helo name if required

hostname=
by ProgXT
03. February 2021 11:18
 
Forum: XAMPP for Windows
Topic: PHP mail() 10061<EOL>Connection refused
Replies: 1
Views: 4000

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Und um es nochmal ganz deutlich zu sagen: Wir sind mit unseren Tests am Ende unserer Möglichkeiten angekommen.

Es gibt noch andere Möglichkeiten E-Mail Versand mit PHP zu testen, die aber alle komplexer (und damit auch Fehleranfälliger für umgebungsspezifische Probleme) sind, als das was wir hier versuchen.
Das einfachste wäre wenn du die Möglichkeit hättest, das ganze auf einem frischen Windows zu testen, Beispielsweise auf einer virtuellen Maschine.

Du kannst natürlich auch einen mailcatcher statt mailtodisk versuchen. Den einfachsten den ich kenne ist mailhog. da gibts ein mhsendmail.exe was du in den sendmail_path einträgst und eine mailhog.exe die du starten musst und dann den smtp traffic auf dem fest definierten Port abgreift. Da kann man nichts verkonfigurieren außer den sendmail_path falsch setzen. Aber auch hier könnte sich natürlich irgendeine sicherheitssoftware dazwischenschalten.

Oder du konfigurierst sendmail voll aus, zum beispiel auf eine gmail email adresse.
by Altrea
16. January 2021 18:22
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Ich habe keine Ahnung Leute, ich habe diese sendmail.ini gepostet weil darin steht ; configuration for fake sendmail
Siehe erste Zeile. Dachte dass das auch damit zusammen hängt.

Ich habe nichts an der Sache geändert nur den Pfad zu mailoutput angegeben..sonst absolut nichts verändert..
by Dirty Harry
16. January 2021 16:26
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Altrea wrote:Die sendmail.ini speilt bei dem Testscript keine Rolle, da der sendmail_path auf die mailtodisk.exe umgebogen wurde. Die ini wird dabei garnicht herangezogen.


Natürlich - aber vielleicht gibt es stattdessen eine andere sendmail.ini, die den Ausgabepfad für die Email festlegt usw. und diese sendmail.ini (oder wie auch immer die heißt) ist ja dann "unbekannt". Ist ja nur so eine Idee, wenn man die falsche sendmail.ini bearbeitet, übersieht man die richtige.
by Nobbie
16. January 2021 16:25
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Die einzige Idee die ich jetzt noch hätte wäre, dass Einstellungen nicht korrekt übernommen wurden (zum Beispiel weil sie geändert wurden und danach der Apache nicht neugestartet wurde, oder dass bestimmte Pfade nicht korrekt vom setup_xampp.bat script gesetzt wurden.

Rufe bitte mal http://localhost/dashboard/phpinfo.php auf und überprüfe dort die mail Angaben (vor Allem sendmail_path bzw. Path to sendmail) und die generellen Pfade.
by Altrea
16. January 2021 16:22
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Die sendmail.ini speilt bei dem Testscript keine Rolle, da der sendmail_path auf die mailtodisk.exe umgebogen wurde. Die ini wird dabei garnicht herangezogen.
by Altrea
16. January 2021 16:19
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Schade.. das wäre es gewesen.

Aber die sendmail.ini ist auch total falsch, das ist die sendmail.ini von sendmail.exe, welches "richtig" Emails versendet. Wo kommt die denn her?? Ich habe dieses mailtodisk nicht hier, aber das braucht kaum Konfigurationsangaben, schon gar nicht die Angabe von smtp_server usw. - irgendwas vermischst Du da gerade?!
by Nobbie
16. January 2021 16:16
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Problem mit Mailtodisk, -> mailoutput bleibt leer

Das ist die sendmail.ini, da habe ich nix dran gemacht, ist so wie installiert, muss man da eventuell was anpassen?

Code: Select all
; configuration for fake sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=mail.mydomain.com

; smtp port (normally 25)

smtp_port=25

; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=mydomain.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=
auth_password=

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines.  do not enable unless it is required.

pop3_server=
pop3_username=
pop3_password=

; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender=

; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify
; the "To: " header of the message content

force_recipient=

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting.  you can manually set the ehlo/helo name if required

hostname=
by Dirty Harry
16. January 2021 16:09
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Problem mit Mailtodisk, -> mailoutput bleibt leer

Hallo Leute,

habe heute die aktuelle Version von xampp installiert...installiert wurde:
apache, mysql, mysqladmin, php und fakemail

Jetzt wollte ich gerade ein php-formular offline testen, also ob Mails abgehen, jedoch bleibt der Ordner ,,mailoutput,, leer, sollte der
aber nicht laut divesen Beschreibungen im Netz.
Es gibt auch keine Fehlermeldung!

So sieht meine php.ini im Block [mail funktion] aus:
Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP=localhost
; http://php.net/smtp-port
;smtp_port=25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header=On

; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog


Der ,,mailoutput,, Ordner ist in..
C:\xampp\mailoutput

Hab ich aber testweise auch in C:\xampp\mailtodisk\mailoutput
erstellt aber auch dort kommt nix rein.
mail() syntax ist ok, online funktioniert das versenden der mails.

Sitze jetzt seit 2 Stunden hier und suche den Fehler :(
by Dirty Harry
16. January 2021 14:49
 
Forum: XAMPP für Windows
Topic: Problem mit Mailtodisk, -> mailoutput bleibt leer
Replies: 40
Views: 49269

Re: Sendmail wird von Script nicht gefunden

Moin,

auch dieses Thema kann als "Erledigt" betrachtet werden.
Wenn ich wie vorgeschlagen
Code: Select all
mb_send_mail
einsetze, bekomme ich nachher BASE64 encodete Mails, was mir Lokal dann einiges Kopfzerbrechen bereitet hat. Einfach nur
Code: Select all
mail
einsetzen.
SMTP : alles Deaktiviert und bei [code]sendmail_path =/code] den Pfad zu einem "Mail2Disk"-Script und alles ist fein.

Danke, für Eure Unterstützung und Geduld.

Schönen Gruß von der Nodseeküste
Heiko
by kokosnuss
03. January 2021 11:41
 
Forum: XAMPP für Linux
Topic: Sendmail wird von Script nicht gefunden
Replies: 7
Views: 36799

Re: Linux, Xampp, Local - Mailversand funktioniert nicht

Moin,

das Problem ist gelöst (Wie ändere ich das Betreff des ursprünglichen Postings entsprechend?).
Die Ursache lag an ganz anderer Stelle.
Als ich das Formular erstellte, wurde ich darauf hingewiesen, dass ich dort nicht
Code: Select all
sendmail

nutzen kann, weil es den Befehl in PHP nicht gibt. Ich solle stattdessen
Code: Select all
mb_send_mail
nutzen.

Was mir nicht bewusst war ist, dass
Code: Select all
mb_send_mail
den Nachrichtentext BASE64 encodet.
Ich habe jetzt im Formular einfach
Code: Select all
mail
eingesetzt und schon bekomme ich lokal , schöne Klartexteinträge in einer Datei und wenn ich das Formular bei meinem Provider laufen lasse, schöne Klartext-Mails.

Ich danke, Euch für Eure Unterstützung und Geduld.
Ohne den Austausch mit Euch, wäre ich
Code: Select all
mb_send_mail
nie auf die Spur gekommen.

Mit freundlichem Gruß
von der Nordseeküste
Heiko
by kokosnuss
03. January 2021 11:34
 
Forum: XAMPP für Linux
Topic: Linux, Xampp, Local - Mailversand funktioniert nicht
Replies: 22
Views: 136844

Re: Linux, Xampp, Local - Mailversand funktioniert nicht

N'abend,

hier scheint es ein paar Missverständnisse zu geben.
Mir ging es von Anfang an darum, dass ich in meiner lokalen Testumgebung sehen kann was vom Kontaktformular versendet wird.

Als erstes habe ich es per "Sendmail" probiert, was erfolglos war.
Dann habe ich es per SMTP probiert, was auch nicht funktionieren wollte.
Mir fiel dann ein, dass es für XAMPP-Windows ein Sendmail-Dumy gibt, der alles in eine Textdatei schreibt.
Also, habe ich versucht ein entsprechenden Tool für Linux zu bekommen, aber obwohl der Dummy für Windows sogar mit ausgeliefert wird, scheint es keine gleiche Lösung für Linux zu geben.
Also, versuche ich nun mit den Tools die vorhanden sind, das gleiche zu erreichen.
Ich hatte nie vor, dass irgendjemand durch das Formular irgendwelche Mails in die Welt schickt.
Auch ist es nie geplant, XAMPP als Server laufen zu lassen.

Können wir uns wieder auf das/die eigentliche/n Problem/e konzentrieren?!
Stand ist:
Es gibt ein Tool, dass die .eml-Datei in eine Textdatei überführt - darin ist aber noch der Base64-Teil kodiert.
Weiter gibt es ein Tool, das den Base64-Teil extrahiert und decodiert.
Ich bin jetzt dabei und versuche alles zusammen in eine Batch-Datei zusammen zu packen.

Gruß HEiko
by kokosnuss
01. January 2021 23:44
 
Forum: XAMPP für Linux
Topic: Linux, Xampp, Local - Mailversand funktioniert nicht
Replies: 22
Views: 136844
PreviousNext

Return to advanced search