ID:1923741
 
(See the best response by A.T.H.K.)
how do you use html to make a email. I Have a server. I have the resources now how does it go together and work. Checked out a libaray it didn't help

yea i know but i need some type of sample to show how php is used within dream maker. Does it come with it do i need to plug something in. Its not seeming to work for me
also considering i have no knowledge with html, php(specifically have just heard of it today while researching), i have no knowledge of networks. So it spells a bad time for me trying to figure it out. I need way more help than that other guy.
Best response
PHP doesn't come with DreamMaker, it's completely separate, it is a server side language that runs behind a webserver.

You'd want to look up how $_GET & mail() works at the very least, from that you would use world.Export() to pass certain things to the web address, ie demo.byondpanel.com/mailscript.php the script does the rest.

I suggested using cURL since you're on BYONDPanel I can open a lot of things up for you to use.

Again, as I mentioned cURL with MailGun will result in a better and quicker mail experience for you.

If you really need help with that, I may be able to whip something up for you.
//Secret API key
#define SEC_API "key-thisisanexample"
//specify your domain, especially good if you've got more than one domain name linked on MailGun
#define DOMAIN "byondpanel.com"

mob
verb
testMail()
var html = {"
<div style="color:red;font-size:20px">Testing html</div>
<div style="float:right">
[usr.key]</div>
"}

sendMail("TO","FROM","Subject",html)
proc
sendMail(mailTo,mailFrom,mailSubject,mailBody)
shell({"
curl -s --user 'api:
[SEC_API]' \
https://api.mailgun.net/v3/
[DOMAIN]/messages \
-F from='
[mailFrom]' \
-F to='
[mailTo]' \
-F subject='
[mailSubject]' \
-F html='
[mailBody]'\
"}
)


https://github.com/msdathk/BYOND-MailGun-cURL
For anyone interested, I've updated the demo to include cURL for Windows, you can download it here - https://github.com/msdathk/BYOND-MailGun-cURL/archive/ master.zip

Or use the Github page above.