import React, { useState } from 'react'; import { View, Text, StyleSheet, Button } from 'react-native'; import * as SMS from 'expo-sms'; const SendSMS = () => { const [message, setMessage] = useState('Levi McLean\n123 Main St\nLondon, ON\n(555) 555-5555\naidanmclean111@gmail.com'); const sendMessageWithSMS = async () => { const isAvailable = await SMS.isAvailableAsync(); if (isAvailable) { const recipients = ['+15195351398']; // Replace with the recipient's phone number const options = { recipients: recipients, message: message, }; await SMS.sendSMSAsync(options.recipients, options.message) .then((result) => { if (result.result === 'sent') { Alert.alert('SMS sent successfully'); } else { Alert.alert('Failed to send SMS'); } }) .catch((error) => { Alert.alert('Error sending SMS'); }); } else { Alert.alert('SMS is not available on this device'); }; }; const onChangeHandler = (value) => { setMessage(value); }; return ( You are going to send the following info: {message}