473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how can i fix my mail function error

123 100+
the code below is a code given to me to solve the problem of my mail going in to spam but i have a problem with line 16 how can i fix it and what should i do i will appreciate if u will edit the problem on the code below

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.    include("Mail.php");
  3.   /* mail setup recipients, subject etc */
  4.   $recipients = "feedback@yourdot.com";
  5.   $headers["From"] = "user@somewhere.com";
  6.   $headers["To"] = "feedback@yourdot.com";
  7.   $headers["Subject"] = "User feedback";
  8.   $mailmsg = "Hello, This is a test.";
  9.    /* SMTP server name, port, user/passwd */
  10.   $smtpinfo["host"] = "smtp.mycorp.com";
  11.   $smtpinfo["port"] = "25";
  12.   $smtpinfo["auth"] = true;
  13.   $smtpinfo["username"] = "smtpusername";
  14.   $smtpinfo["password"] = "smtpPassword";
  15.   /* Create the mail object using the Mail::factory method */
  16.   $mail_object =& Mail::factory("smtp", $smtpinfo);
  17.    /* Ok send mail */
  18.  $mail_object->send($recipients, $headers, $mailmsg);
  19. ?>
  20.  
Nov 27 '09 #1
1 1884
Dormilich
8,658 Expert Mod 8TB
you’re using PHP4? other than that there is no way we can help you, because we don’t know what the error is or what the Mail class does.
Nov 27 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Web Master | last post by:
Hi, I am having a little issue with Jacks Form mail php script. I have installed it and configured the form to get it to work, but for some bizarre reason I have 2 issues I can't seem to debug....
1
by: Ra?l | last post by:
Hi there, Windows XP Professional SP2 Apache HTTP Server 1.3.33 PHP Version 4.3.10 i'm just trying to send a mail with the mail() function but it seems not to work. First I installed a...
7
by: Rafal Zawadzki | last post by:
Hello again. Mail() function in my php doesn't work. I've got very simple script: <? mail("bluszcz@jabberpl.org","Test","Test"); ?>
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
0
by: Adam Honek | last post by:
I'm having this odd bahaviour with the new .net.mail SMTP sending code below. It either gives me an exception error or no error but the main form doesn't show making it seem as if it's not...
11
by: Lieven | last post by:
Hey, I had a hard disc problem last week on my server. I replaced the disc and copied al the files to the new hard disc, everything works fine again except some php scripts that are using the...
13
Nert
by: Nert | last post by:
hello every one, i need help.. how can i use the mail() funtion in php? when ever i execute the mail function i continuesly receive this error message: what do i need to do in order for me...
2
by: Ruud | last post by:
Just before leaving for a holiday my collegue modified this script. Now it won't send any body text (The data filled in on the form) and in an error condition it won't send any attachments either....
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
7
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.