Hi
I am trying to test out sending HTML in an email with no luck.
Here is the code in test.php.
test.php ( 1.35k )
Number of downloads: 595
I send mail that contain both plain text and html in the same e-mail.
This is an overview of what you need to do:
Hi
Thanks for that.
I can send email from the test code only you gave me.
The problem is that I cannot send email accessed from a form.
The relevant files are below:
So, my sample code did work for you but you're having trouble incorporating it into your script? Is that correct?
I looked at Comm1.php, because that's the script that sends the mail. Your logic is all messed up. !st, you don't do any validation, I guess you depend on 'required' to handle that for you, you shouldn't. Next you define the function getRandomString() inside a try block. You should not do that. I don't understand why you do that at all. You could use:
Hi
Thanks for your help so far.
I am having trouble sending a text email through this code: emailtext.php.
The code that you gave me only sends a text email to second@ecovib2d.com.au (my second email address).
It does not send the html part.
Thanks.
I've been offline for 72 hours, power failure. I will look at the code later and post back.
Sorry ok.
I haven't forgotten about you. I have to catch up on many things. I tested the code on my web server and now I get an error 500, my host provider forced PHP 7.4.13 on me and I didn't know it. Anyway, give me a few days or you can just use a library, like PHPMailer.
Hi
Thanks for that.
Its not urgent.
Thanks.
Hi
I am now using PHPMailer to send out emails.
But I am getting an error.
[01-Mar-2021 10:18:16 UTC] PHP Warning: Creating default object from empty value in /home/ecovibdc/public_html/workfromhome/Emailcomm/Comm1.php on line 92
[01-Mar-2021 10:18:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::setFrom() in /home/ecovibdc/public_html/workfromhome/Emailcomm/Comm1.php:100
Stack trace:
#0 {main}
thrown in /home/ecovibdc/public_html/workfromhome/Emailcomm/Comm1.php on line 100
The php file that I use PHPMailer is Comm1.php.
Hi
I have solved the below problem.
The program works now but I get this error in the delivery of email:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
second@ecovib2d.com.au
Sender from address in blocked list
I am using second@ecovib2d.com.au as my test email address.
Thanks.
Hi
Just an update.
I will use an existing (off the shelf) platform to send html emails to my list.
Thanks for your efforts so far.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)