SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mail is not working :Gmail Perfect but Yahoo,rediff is not working

    Hi all,
    THis code i have written.
    Mail is not working means Gmail is working Perfect but Yahoo,rediff is not working.
    But still it shows Mail has been send but In yahoo i didnt receive any email
    PLz any one....

    Code:
    $to=$_POST['TREF_Contact_Email'];
           $subject=$_POST['TR_Subject'];
           $body='<table width="350" border="0" align="center">
    			<tr>
    			<td><div align="left">'.$_POST['TR_Content'].'</div></td>
    			</tr>			
    			<tr>
    			<td align="center">Dont Reply to This Id.</td>
    			</tr>
    			<tr>
    			<td align="center"><a href="http://C-eased.org">admin@c-eased.org </a></td>
    			</tr>
    			</table>';
    	   $headers  = "MIME-Version: 1.0\r\n";
    	   $headers .= "Content-type: text/html; Charset: ISO-8859-1\r\n";
    	   $headers .= 'To:'.$to. "\r\n";
    	   $headers .= "From:c-eased.org<nobody@server.websys.co.in>\r\n";
    	   /***********************if(eregi("gmail",$to))
    	   {
    	   $headers  = "MIME-Version: 1.0\r";
    	   $headers .= "Content-type: text/html; Charset: ISO-8859-1\r";
    	   $headers .= 'To:'.$to. "\r";
    	   $headers .= "From: admin@c-eased.org <nobody@server.websys.co.in>\r";
    	   }
    	   else
    	   {
    	   $headers  = "MIME-Version: 1.0\r\n";
    	   $headers .= "Content-type: text/html; Charset: ISO-8859-1\r\n";
    	   $headers .= 'To:'.$to. "\r\n";
    	   $headers .= "From: admin@C-eased.org<nobody@server.websys.co.in>\r\n";
    	   }
    	   **********************/
    	   if(mail($to,$subject,$body,$headers))
    		{
    		$smarty->assign("msg","Mail has been send.");
    		
    		}
    		else
    		{
    		$smarty->assign("msg","Mail has not been send.");
    		}
    -::Ujjwal::-
    Visit My Site

  2. #2
    derrrp
    Join Date
    Aug 2006
    Location
    earth
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    for ease of use, assign your FROM address to a variable.

    PHP Code:
    $from "address@domain.com"
    Then add this to your mail() call.

    PHP Code:
    "-f$from
    so your mail call should look like.

    PHP Code:
    mail($to,$subject,$body,$headers"-f$from
    Hope that helps.
    No, I REALLY dislike having to use Joomla.

  3. #3
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Huum,
    But It is working in the case of Gmail( which supprot q mail).
    It is starnge.
    But it wont work for Yahoo /Rediffmail.
    i am trying....
    -::Ujjwal::-
    Visit My Site

  4. #4
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry Crowden,
    Its not working.
    -::Ujjwal::-
    Visit My Site

  5. #5
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yahoo may be throwing your message in a spam folder. Have you checked there?
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  6. #6
    SitePoint Enthusiast FSan's Avatar
    Join Date
    Dec 2005
    Location
    San Martin de los Andes, Patagonia Argentina
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was having a lot of problems sending mail from the server and getting filtered by antispam soft. It has to do with the headers when sending mail with mail() from Apache, user 'nobody' and so on.
    Solution: phpmailer.sourceforge.net/
    The important thing is to use the smtp option and set up a real address so the server sends from there. Header-wise is the same as sending with outlook or any e-mail client. Hope this helps. Good luck

    Help the web. Kill a spammer


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •