/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] PHP mail() function works in Firefox, but not Internet Explorer (IE)

Hi,

I’ve got the standard mail code in my mail.php file, like so:

@mail($to, $subject, $message, $headers);

My problem is that it all works well in Firefox, but not in Internet Explorer. It doesn’t return any errors at all in IE, it just doesn’t work at all and doesn’t send any email.

I’ve tried putting different email addresses, and it still only works in Firefox. I know that my host should have PHP and a mail server installed, since it works in Firefox.

Any ideas as to why it doesn’t work on Internet Explorer?

Can anyone shed any light on this? Any help will be greatly appreciated.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@SheldonOct 10.2006 — That is not your problem. mail() is a PHP function, PHP is run on the server side. Nothing to do with the client browser.
Copy linkTweet thisAlerts:
@pcthugOct 10.2006 — Can you post your code.
Copy linkTweet thisAlerts:
@NogDogOct 10.2006 — Could be an HTML error in your input form which one browser is interpreting one way and the other browser a different way. Check the HTML syntax of that page at http://validator.w3.org/ .
Copy linkTweet thisAlerts:
@felgallOct 10.2006 — You could try taking the @ off the front temporarily so that you can see the error message rather than hiding it.
Copy linkTweet thisAlerts:
@kraiggauthorOct 12.2006 — Thanks guys, I found what the problem was.

I had a sample of a mail code, and the first line in my form was:

  • * <form action="mail.php" method="POST" enctype="multipart/form-data"> *


  • The problem was with the (enctype="multipart/form-data") part of it. Somehow it worked in Firefox but not Internet Explorer. Taking that out fixed everything.

    Thanks again.
    ×

    Success!

    Help @kraigg spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.20,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...