Sending mail

Discussion to talk about software related topics only.
Vernon
Posts: 177
Joined: Sat Oct 10, 2009 6:33 pm

Re: Sending mail

Post by Vernon »

Ok - I have it set to email me if the MR per hour goes over .1

I am going to get my 1940's radioactive dish and test that.
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Sending mail

Post by v8dave »

OK now that you have it working, tell us why you have a radiation detector? :D

Dave...
Vernon
Posts: 177
Joined: Sat Oct 10, 2009 6:33 pm

Re: Sending mail

Post by Vernon »

// Email variables
char SMTP_server[80];
char var_user[80] = "Vlermond@cttestset.com";
char var_pass[80] = "yourpassword";
char var_svrip[80] = "66.147.242.85";
char var_from[80] = "vernon@cttestset.com";
char var_to[80] = "vernon@cttestset.com";
char var_sub[80] = "HIGH RADIATION !";
char var_body[80] = "Radiation has exceeded .1 MR per hour !";
int SendmailResult;
int DNSResult;
// these go with the rest of your variables. The code below goes in wherever in your logic you want to have email sent. Might save you $99 !



SMTP_PORT = 26;
IPADDR SMTP_server;
DNSResult = GetHostByName( var_svrip, &SMTP_server, 0, TICKS_PER_SECOND * 20 );
SendmailResult = SendMailAuth( SMTP_server, var_user, var_pass, var_from, var_to, var_sub, var_body );

Above is what worked for me - except I am not telling you my password.

http://www.pahrumpgeigercounter.com/

I have a radiation detector because I retrofit old, low sensitivity Geiger Counters with a microprocessor and a larger Russian tube. They are capable of survey use and also as internet connected background radiation monitors. I got into this during the Japan calamity - wanted to see if anything was getting here. Haven't sold that many but like the site and if I ever do get radiation - it will now go right to my phone.
Vernon
Posts: 177
Joined: Sat Oct 10, 2009 6:33 pm

Re: Sending mail

Post by Vernon »

char var_body[80];
// leave blank as opposed to a message as I did above.

sprintf(var_body, "MR per hour %6.3f\r\n", EMR);

if you want to send an exact value as opposed to just a text warning you can write it into var_body as above prior to calling the email routines.
Vernon
Posts: 177
Joined: Sat Oct 10, 2009 6:33 pm

Re: Sending mail

Post by Vernon »

Post Reply