| Author | 
         | 
         
      
        
         
         GadgetGuy Super User 
          
  
  Joined: June 01 2008 Location: United States
 Online Status: Offline Posts: 942
          | 
        
         
          
           | Posted: December 16 2008 at 18:20 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I have a macro that tries to send two different emails 
 to me when a video camera motion is detected.
 
 The first sends an SMS message via one ISP and the 
 second entry in the macro tries via a different ISP to 
 send a standard email with an attached jpg (camera 
 image)file.
 
 The SMS transmission works OK but the email with 
 attached file never goes out.
 
 My command string is...
 
 if(ph_getglobal_s("CAM2FLAG")="1",ph_sendemailfile("mylo
 gin@yahoo.com","Motion inHouse","Motion Detected on 
 Camera2...","http://spinfarm.xxxx.com:8000/cam_2.jpg"),0
 )
 
 
 where "mylogin" and "xxxx" are changed to protect the 
 innocent!
 
 This URL as an image source does not work.  If I 
 substitute a standard jpg image file on the PH server 
 computer, the email transmits OK, but with the web based 
 file (which is the only way I can access my camera's 
 dynamic web page)the email attempt fails.
 
 Is there any way I can grab the http based dynamic file 
 and attach it to the email?  
 
    
  __________________ Ken B - Live every day like it's your last.  Eventually, you'll get it right!
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: December 16 2008 at 20:08 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I believe that you would need to grab and save the file via ph_saveitcurl, then email that.
 
 
Code: 
   
    
    
      
       Formula [LOCAL1] ph_saveitcurl("http://spinfarm.xxxx.com:8000/cam_2.jpg", "c:\cam_2.jpg",1,5)
 ph_sendemailfile("mylogin@yahoo.com","Motion in House","Motion Detected on Camera2...","c:\cam_2.jpg") | 
       
       | 
    
    | 
 
 
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         GadgetGuy Super User 
          
  
  Joined: June 01 2008 Location: United States
 Online Status: Offline Posts: 942
          | 
        
         
          
           | Posted: December 16 2008 at 21:51 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
OMG!
 
 Is there anything that PH can't do?
 
 I'm almost blown away.  That is an amazing function 
 addition and beyond my expectations.
 
 I'll give 'er a try
 
 THANKS!
  __________________ Ken B - Live every day like it's your last.  Eventually, you'll get it right!
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         GadgetGuy Super User 
          
  
  Joined: June 01 2008 Location: United States
 Online Status: Offline Posts: 942
          | 
        
         
          
           | Posted: December 17 2008 at 08:03 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
TonyNo -
 
 You are pure genius!
 
 It works flawlessly.  You can't even begin to imagine 
 how happy I am!  I have been wanting to be at this point 
 for years.  
 
 Thanks to webcamXP and PH developers working together, 
 it is now possible to use webcamXP to sense camera 
 motion or sounds and send a trigger message to PH.  From 
 inside PH I can now create macros (that I can control 
 via the Control Center) to send SMS messages and/or 
 email messages with camera images to my iPhone.
 
 Since I also use the Safari browser on the iPhone to 
 access my home web server, I can sense all lighting as 
 well as control it, plus house temp.
 
 Next is to get sensors in our various freezers to 
 monitor their temperatures too.  A few years ago we lost 
 over $1000 of meat when a brownout caused the freezer 
 compressor motor to fail and we came home to a stinky 
 awefull mess.
 
 But of all of it, this new control over cameras is now 
 the best and baddest of it all.
 
   Thanks again for your terrific help.   
  __________________ Ken B - Live every day like it's your last.  Eventually, you'll get it right!
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: December 17 2008 at 20:51 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Well, now, I wouldn't say that.  
 
 You're welcome, and have fun!
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   |