Help Wanted

Posted by Glen on May 26, 2010, 9:13 p.m.

So I'm having a little problem with my new software. In my last blog I explained that I was writing a program that will let me email people in bulk from mailing lists. I looked up ways to send emails and the only one I came across that actually worked for me was to write a php script, upload it to my website, and run a command in gamemaker that called on the php script and sent the emails like that. My problem is everytime an email is sent, a tab is opened on my internet browser. Initially it was supposed to be a message that let you know the email was sent. I've been trying to find a way to ignore this step and just have the email sent without a confirmation page popping up. Picture 25 tabs appearing after you send an email to a mailing list of 25 subscribers. It sucks. So…. here's the php script. It came from the gmc:

<?php

$newline = $_GET['message'];

$newline = str_replace("[N]","\n","$newline");

$newline = str_replace("[n]","\n","$newline");

mail($_GET['to'],$_GET['subject'],$newline,"From: ".$_GET['from'

echo "<FONT FACE=\"Verdana\" SIZE=\"2\">".$_GET['thanks']."</FONT>";]); ?>

My emailing script in gamemaker is:

//scr_send_mail(to,from,subject,message,thanks);

var php,msg_to,msg_from,msg_subject,msg_message,msg_thanks;

php = "http://www.yourwebsite.com/php/send_mail.php?to=";

msg_to = argument0;

msg_from = argument1;

msg_subject = argument2;

msg_message = argument3;

msg_thanks = argument4;

execute_shell(string(php)+msg_to+"&from="+msg_from+"&subject="+msg_subject+"&message="+msg_message,"");

I believe it's the execute_shell that is causing the tabs to open up everytime the php file is called. I want to find a way to have the email sent without opening an internet browser. That way I can repeat this script in an event. If you're willing to help, please leave a comment or message me through PM. I'd really like some help with emailing.

Comments

KaBob799 14 years, 5 months ago

You'll need to use a dll like 39dll, that's how I access my php pages in games.

Glen 14 years, 5 months ago

I'll have to take a look at it. I'm not that great with 39dll yet. But if that's the only feasible way of accomplishing this task then I guess I'll have to try it out. I've played around with 39dll examples. Mainly multiplayer games and a few downloading examples. Haven't tried accessing websites and php pages yet.

KaBob799 14 years, 5 months ago

All you do is download the php page, I think theres at least one other dll that does it but I'm not sure what it's called.

Alert Games 14 years, 5 months ago

Yes youll need to use either 39.dll or NetRead.dll

Ive only used netread for this purpose. but both would have you send the information via url then anything the PHP echos will be returned as a string.

Juju 14 years, 5 months ago

You use 39DLL to access a PHP script by using HTTP. I did make a program that did that but it's lost in the annals of history.

OL 14 years, 5 months ago

You should try using Maarten Baert's HTTP DLL.

Glen 14 years, 5 months ago

I'm trying the http dll now.