Author Topic: No error - but mail is not delievered !!  (Read 1115 times)

0 Members and 1 Guest are viewing this topic.

Korguz

  • Guest
No error - but mail is not delievered !!
on: Tue, 22. October 2002 - 14:36:57
Here is my code:

<?php
    include_once("../vlib/vlibMimeMail.php");

    $mail= new vlibMimeMail; // create the mail
    $mail->to('[email protected]');
    $mail->from('[email protected]');
    $mail->subject("this is a test subject");
    $mail->body("Hello

This is a plain text body for the mail!");    // set the body

    $mail->send();
    echo "<pre>", $mail->get(), "</pre>"; // and echo the entire body of the mail to see what it looks like
?>

And here the result:

To: [email protected]
Subject: this is a test subject
From: [email protected]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: vlibMimeMail

Hello

This is a plain text body for the mail!


But the email is not delievered!
My system is Linux with Apache, PHP 4.1.2 and sendmail
what can be wrong?

Thanks

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
No error - but mail is not delievered !!
Reply #1 on: Tue, 22. October 2002 - 18:56:16
Code looks ok.

Is sendmail working?

If you use "sendmail" within a shell, does the mail gets to the reciepent?

I had the same problem. But when I tried to use the normal PHP mail() function I figured out, that something else was wrong.

Best regards,
Claus

Korguz

  • Guest
No error - but mail is not delievered !!
Reply #2 on: Wed, 23. October 2002 - 20:44:30
The problem is in specifying the server SMTP of e-mail.  
The class should foresee the use of that type of e-mail server.
Unhappily the vLib still doesn't have that support still.

I need that characteristic, then I had to use another class called phpmailer

Best regards too

Korguz

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
No error - but mail is not delievered !!
Reply #3 on: Wed, 23. October 2002 - 23:23:34
Please answer the questions:

Is sendmail working?

If you use "sendmail" within a shell, does the mail gets to the reciepent?

I installed postfix and postfix supports "specifying the server SMTP of e-mail".

Imho this cannot be the task off a MimeMail class.

Imho it is not possible to specify the SMTP server in your PHP code:

Quote
bool mail (string to, string subject, string message [, string additional_headers])

mail(\"[email protected]\", \"the subject\", $message,
\"From: webmaster@$SERVER_NAME
Reply-To: webmaster@$SERVER_NAME
XMailer:
PHP/\" . phpversion());


And what PHP cannot provide, neither can vlibMimeMail.

Best regards,
Claus

releasedj

  • Guest
No error - but mail is not delievered !!
Reply #4 on: Thu, 24. October 2002 - 10:25:32
If you can send mail using php's mail() function then you should be able to use vlibMimeMail without problems.
This is not to say that there won't be a bug, however I've used it on Windows and on various *nix machines without a problem.

In the past I have thought about writing in an SMTP class for connecting directly to an SMTP server, however I think that would complicate the task that vlibMimeMail is there for. It is aimed at being a class that simplifies the use of php's mail() function so that you don't have to get your hands dirty with the mime encoding.

Regards,

Kelvin

Korguz

  • Guest
No error - but mail is not delievered !!
Reply #5 on: Wed, 30. October 2002 - 13:29:32
This post has been removed by releasedj as it was nothing to do with vlibMimeMail and was a rather big post.

releasedj

  • Guest
No error - but mail is not delievered !!
Reply #6 on: Wed, 30. October 2002 - 15:06:22
This forum is for people who are using vlibMimeMail and who have questions about it.

If you found that vlibMimeMail didn't meet your requirements, that's fine.
I hope you find something that you can use, but please don't post support questions to this forum regarding other programs.

In any case, if you get mail() working, then vlibMimeMail should work as well.


Regards,

Kelvin

PS: I've removed your last post, as this takes space in vLIB's Db.