Can you please tell me what is wrong? There is no error and mygmail@gmail.com is my not what I typed in and same with myicloud@icloud.com and XXXXXXXXX
Don’t you need to enable SSL when sending via gmail? I recently did a VB project which required this. I also needed to sign into gmail and tell it to allow less secure apps to send email.
Generally people advise to steer clear of the built-in mail() function and use something like PHPMailer instead.
Not sure what this bit means sorry, perhaps you could clarify:
’ and mygmail@gmail.com is my not what I typed in and same with myicloud@icloud.com and XXXXXXXXX’ means that in my code stuff like XXXXXXXXX is not XXXXXXXXX, but say my password and mygmail@gmail.com is my gmail in my code and myicloud@icloud.com is my icloud email. I will try phpmailer and will try using ssl.