Closed (fixed)
Project:
SMTP Authentication Support
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2008 at 21:45 UTC
Updated:
10 Dec 2008 at 22:16 UTC
I have a script that executes based on a condition set by the workflow-ng module, and it basically just creates an email.
I'm using the mail function, like so: mail($to, $subject, $body)
SMTP module is enabled and working, it works for the rest of the site. But when it executes this custom PHP snippet, it still uses the mail function and sends from "nobody". How can I use SMTP module in my custom php snippet?
Comments
Comment #1
graper commentedthat is the improper mail function to use as you are using the php mail function. You need to use the drupal_mail() function
you can find more information on the drupal mail function here. http://api.drupal.org/api/function/drupal_mail/5
Comment #2
sansui commentedThanks, using drupal_mail worked perfectly. Problem solved
Comment #3
sansui commented