Jump to content

Trying to make PHP send an email.


Korelis

Recommended Posts

Hello Everyone,

 

I had a friend help me with this PHP project I am working on.  However, my friend decided to run off to France and leave me in the dust.  Any help would be GREATLY appreciated :-).

 

What I am trying to get is for an email to be generated for each account/contact that matches the lines error lines.  I am going to have a static email that will allow me to place the errors towards the end.  But I am not sure what exactly to do next. 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Sending mail in php is really easily done just use this is example below

 

<?php
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

 

Link to comment
Share on other sites

Using the mail function in this script would I be able to use the information pulled from the array?

 

For example I want to send the email to the person who matches the DSCD# in the error file (and below until the next DSCD# is reached) with the dscd# from the contact file. 

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.