Jump to content

Emailer


Recommended Posts

Posted (edited)

https://community.multitheftauto.com/index.php?p=resources&s=details&id=11231

Im use this resource for send email. When I sent email, it is giving warning. But the email is sending. Why???

function sendCustomMail(subject, header, sendto, mail) 
    local header = "From: "..subject.." <"..(header or fromRandom())..">" 
    callRemote("mylink/mailer.php", returns, subject, header, sendto, mail) -- This website is not available any more so add the PHP files in your own website and put URL here. 
end 
addEvent("sendEMail", true) 
addEventHandler("sendEMail", root, sendCustomMail) 
  
function returns(msg, num) 
    if msg == "ERROR" or (not msg) then 
        outputDebugString("E-Mail not sent due to webpage errors, check the script and/or page provided.", 2) 
    else 
        outputDebugString(msg, num or 3) 
    end 
end 

I don't change anything.

n7vzR5.png

Edited by Guest
Posted

I don't quite get you. You get a warning, but the email is sent successfully? Show your PHP script.

Posted

If you want to delete warnings, edit your returns function.

function returns(msg, num) 
    if msg == "ERROR" or (not msg) then 
        --outputDebugString("E-Mail not sent due to webpage errors, check the script and/or page provided.", 2) 
    else 
        --outputDebugString(msg, num or 3) 
    end 
end 

Posted

It's not actually an error, it just returns a message to check whether the webserver is down or not. No idea why script creator added this. :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...