Jump to content

Substitute for mail() function


Thauwa

Recommended Posts

Hello.

I am new to these forums.  :oops:

The host I am using (GoDaddy) disables any function to be carried out with the php code mail().

My need is dire. I need to somehow use this method.

Can anyone give me a suitable approach to my problem (i.e. something to replace "function')?

 

Thank you. I am working a deadlined project for my boss. I use php/MySQl.

So please help me.

Link to comment
Share on other sites

Becouse your boss dosent want to move from your current crap host,

 

solution's

 

1. build a built in message system, Like this forum with no emails being sent out theo...

 

2. look up a dns service that helps with blocked mail.

 

 

IF YOUR BOSS WANTS A REAL EFFECT IN TODAYS WORLD THEN HE PAYS FOR A NICE PROPER PHP 5 HOST

PACKAGE, THERE VERY CHEEP AROUND $3 A MONTH OR £1.50 MONTH.

 

Good luck.....

 

Link to comment
Share on other sites

do this then

 

provided from here ok.

http://www.zen-cart.com/forum/showthread.php?t=83459

 

 

No PHP code changes involved here!

 

Go to the email configuration page in the ADMIN system.

 

I was only able to get SMTP method to work.

 

I had to use the mail relay server "relay-hosting.secureserver.net" provided by godaddy as the smtp host. This may be different for your machine - contact godaddy to confirm the name of the Mail Relay Server for your configuration.

 

You must set the email to be sent from a known domain to YES. This forces the emails to use the SENT FROM address you will set up next.

 

You must use an email address like zencart@YOURDOMAIN.COM (though not required to be an actual mailbox) in the SENT FROM option.

VERY IMPORTANT==> The email address must contain your domain in the address.

 

SMTP Account MAILBOX and PASSWORD should be blank.

Link to comment
Share on other sites

Its all covered in the manual.

 

where does '$from' come?

 

How should we know? we would need to see your code.

 

are there other $ signs?

 

If you really need to ask that question I think your boss should seriously consider hiring someone who knows what they are doing.

 

 

Link to comment
Share on other sites


class Mailer
{
      function sendWelcome($user, $email, $pass){
      $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
      $subject = "Welcome to my site!";
      $body = $user.",\n\n"
             ."Welcome! You've just registered at ILoveDOingStuff.com "
             ."with the following information:\n\n"
             ."Username: ".$user."\n"
             ."Password: ".$pass."\n\n"
             ."If you ever lose or forget your password, a new "
             ."password will be generated for you and sent to this "
             ."email address, if you would like to change your "
             ."email address you can do so by going to the "
             ."My Account page after signing in.\n\n"
             ."- ILoveDoingStuff.com";

      return mail($email,$subject,$body,$from);
   }

 

Thats the code. There is a process.php file and it makes function sendWelcome work when a new member signs up. sendWelcome is given above. GoDaddy dosen't allow

$from, $subject and $body. I tried a plain mail code like:

<?php

mail
(
"admin@ilovedoingstuff.com",
"test message",
"this is a test message, 
if you are reading this the email was sent successfully."
);

?>

(i got code from another site)

This code worked. so, how to I set up the first code to work in the format of the second? this is my objective. thanks for help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.