Jump to content
Old threads will finally start getting archived ×

PeterPans

Members
  • Posts

    24
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

PeterPans's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. oh cool! thank you! I will have a look at that!
  2. ok.. my system must be badly configured for some reason.. Mailutils is installed and working, but when i am done writing the body of the e-mail.. I press ctrl + D to proceed to the sending of the e-mail.. but nothing happens..
  3. yes you are right.. but the thing is that every required module is installed... sendmail, mailutils.. etc.. :/ Also, I am trying to send e-mail from the terminal, but for some reason I have not moved further after typing the message.. im hitting Ctrl + D but nothing happens.. wtf????!!!!!!
  4. Also, the php manual saya that no installation of any kind of mail server is required because these things come with the PHP core files.. http://gr2.php.net/manual/en/mail.installation.php
  5. I have actually installed sendmail.. not sure If i should install Postfix as well.. or not sure which one to use.. I used this http://www.yolinux.c...S/Sendmail.html but still it doesnt work.. :/
  6. im running linux ubuntu.. and I have no idea how to set up those.. do these come with the installation of Apache?
  7. on my own environment (localhost), the thing is that others (and you) have tested my script as well.. to check if it is working and it does.. so i know that the script works fine.. what i dont know is what i have done wrong on the php.ini file.. because I am pretty sure that thats where the problem is.. :/
  8. no error messages, nothing.. just "Failed to send email!".. :/
  9. yes thats what i want to do.. i tried the new script you posted.. still it does not send e-mails.. I am pretty sure its a configuration issue.. Would you mind posting the [mail function] of your php.ini file? So, I can compare it with mine.. Thank you for helping me out by the way..
  10. and thats how I have my [mail function] set up in my php.ini [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 = "From:" [email protected] ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = /usr/sbin/sendmail -t -i ; 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(), even in safe mode. ;mail.force_extra_parameters = ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = 0 ; 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 = /var/log/mail.log
  11. I am confused.. and now I am 100% sure that there is something wrong with my configuration.. If i use your script.. I get "Failed to send e-mail"..
  12. SMTP and SMTP_PORT are the same.. the from address is inactive.. Am I supposed to put my e-mail address there? though why should I put my e-mail address? the e-mails should be sent to my e-mail address not from my e-mail address.. I am making this form for other to be able to send me e-mails.. not for me to send e-mails..
  13. No it doesn't.. I get If i try to execute it again without the I can see that the data are getting stored in the variables but the e-mail is not being sent.. Can you show me how you have set up your [mail function] in your php.ini file? I follow the runtime configuration from the php manual in order to configure mine, but still i can't send e-mails.. :/
  14. Hello, I wrote an emailer script to add to my web site. The code seems to be fine and the variables seem to parse, but still I can not send an e-mail. Could you please tell me what am I doing wrong? I think the error is somewhere in the sendEmail function, but a second opinion is always better to have. The code is: <?php class emailer { private $sender; private $subject; private $body; function __construct($sender) { $this->sender = $sender; //$this->recipient = $recipient; } function addSender($sender){ $this->sender = $sender; } function addSubject($subject){ $this->subject = $subject; } function addBody($body){ $this->body = $body; } function sendEmail(){ $this->recipient = '[email protected]'; $this->result = mail($this->recipient, $this->subject, $this->body, "From: {$this->sender} \r\n"); if (!$this->result){ echo $this->result; echo $this->recipient; echo $this->sender; echo $this->subject; echo $this->body; echo "Error"; } else{ echo "e-mail was sent."; } } } ?> Thank you in advance. PS. when I execute the script, I get as output "Error", and I also get the data stored in the variables (recipient,sender,subject, and body).
  15. what u read is what u get.. i am not giving any more info because i obviously dont want to, for several reasons.. either reply with a suggestion/solution or dont reply at all..
×
×
  • 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.