Skip to:
Content
Pages
Categories
Search
Top
Bottom

Send an SMS along with the activation mail


  • dacano_1990
    Participant

    @dacano_1990

    Hi everyone,

    Great plugin so far. I was just wondering is there any way to send the activation link via sms too? I have added the function in the bp-custom.php. Posting it here below:

    			function send_sms($recipientno, $key) {
                            $ch = curl_init();
    
    			$user="sms_user:sms_pass";
    
    			$receipientno="1234567890";
    
    			$senderID="ID";
    
    			$msgtxt="Thanks for registering! Please use this link to complete registration: http://localhost/gcs/activate/".$key."/"; 
    
    			curl_setopt($ch,CURLOPT_URL,  "http://api.mVaayoo.com/mvaayooapi/MessageCompose");
    
    			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
    			curl_setopt($ch, CURLOPT_POST, 1);
    
    			curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user&senderID=$senderID&receipientno=$receipientno&msgtxt=$msgtxt");
    
    			$buffer = curl_exec($ch);
    
    			if(empty ($buffer))
    
    			{ echo "<p style='display:none;'>buffer is empty</p>"; }
    
    			else
    
    			{ echo "<p style='display:none;'>".$buffer."</p>"; } 
    
    			curl_close($ch);
    }

    I am calling it in the bp-members-function.php

    		if ( apply_filters( 'bp_core_signup_send_activation_key', true, $user_id, $user_email, $activation_key, $usermeta ) ) {
    			bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key, $user_login ); 
    			send_sms($recipientno, $activation_key);
    		}

    It is not sending the sms though. Any help would be greatly appreciated.

    Thanks,
    David

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar