I created email with markdown laravel . I get the email content (HTML) but it not true , My email not received tag HTML .
Here is my email , thanks a lot of your help
I tried
php artisan view:clear ,
php artisan cache:clear ,
php artisan queue:restart but it still not success .
After a long time tried , the last time , I check error when create mail blade . Whitespace be made mail not receive "HTML" . After deleted it , Mail was correct Email blade
Related
For my website, i use a free template form startbootstrap.com, in this template there is a "Send Mail" button, i tried to get it running, but it doest, work. How can i make it work?
I have already changed the mailto#something.com to my real email and it didnt work. I am not very experienced in web developing, so it might be a very simple thing. Any help would be much appreciated
Here is the code section for the email part: \n
The only line i changed was :
action="mailto:myreal#mail.com" method="POST" enctype="text/plain">
This section tells me that i should configure my web server differently if things dont work, how would i do that
<!-- The form should work on most web servers, but if the form is not working you may need to configure your web server differently. -->
I expected this part, to just send an email to me from the provided email addres with the given content, but when i try to run it it says:
Sorry, it seems that my mail server is not responding. Please try again later!
Thanks in advance!
I don't know which template you have chosen, but with "Freelancer" there's a contact_me.php located under mail folder, where you should configure this part:
$to = "yourname#yourdomain.com"; // Add your email address inbetween the "" replacing yourname#yourdomain.com - This is where the form will send a message to.
$subject = "Website Contact Form: $name";
$body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email\n\nPhone: $phone\n\nMessage:\n$message";
$header = "From: noreply#yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply#yourdomain.com.
$header .= "Reply-To: $email";
Since you need php and mail server for this to work, after configuration you can deploy it to a server like xampp or wampp if you'd like to test it locally or just copy it to a real webserver.
I want to get current IP address from OS. Required to remove dependancy of hardcoding url path in 'scripUrl' for 'UrlManager' component in console.php so that cron controller can send emails with proper hyperlinks
The yii Request component is unavailable in console-app
You'll need to rely on php built in functions
From CLI
PHP < 5.3.0
$myIp= getHostByName(php_uname('n'));
echo $myIp;
PHP >= 5.3.0
$myIp = getHostByName(getHostName());
echo $myIp;
see this answer
I have a script that currently does several things. It creates a user account in Active Directory, writes data to a SQL table and sends an email to the account requestor with the account's user name and password.
We'd love to add a hyperlink to that email so that the requestor can click to view their original request form, but I can't quite seem to get the syntax right.
Because double quotes are used in the PowerShell syntax as well as the HTML link, I defined the link as a variable and inserted that variable into the -body section of the email to eliminate double quote confusion, though this may not be necessary.
Can anyone help me insert a link in this email?
Many thanks!
CURRENT COPY:
"The user account you requested (request #$ReqID) has been created."
We'd like $ReqID to hyperlink to the Web form.
THE VARIABLE I'VE DEFINED:
$link = '$ReqID'
But it displays in the email body like this:
The user account you requested (request #$ReqID) has been created.
Help?
Swap your quotes around, i.e.:
$link = "<a href='http://tsturl/detail.aspx?reqID=$reqID'>$ReqID</a>"
Or do:
$link = '$ReqID'
$link = $ExecutionContext.InvokeCommand.ExpandString($link)
Further to your comment, if you want the mail body to render as HTML, an thus display a link, then you'll need to tell your mail client that the body is HTML. $link is just a plain old string and doesn't know that it's HTML.
From your previous question, I'm guessing you're using the Send-MailMessage cmdlet. If so then you need to specify the -BodyAsHtml switch.
I am using Active admin to save my email templates. I am also using Mail Gun to send my emails.
The whole process works absolutely fine if I define my email boday as text such as:
body = "This is the text in my email"
If however I attempt to use the template I made in my active admin like so:
body = load_rendered_template("new_quote_email")
I get the error: wrong status line: '<html>'
The app is using SSL would this have anything to do with it? This is the same error both in production and development.
I am trying to figure out how to make a simple html code so that whenever anyone on the page types anything into the provided text box and hits submit, it adds that written text to an already existing .txt file on my server.
UPDATE 2/20/14 9:29AM: Well that's unfortunate. I kind of figured I required a .php but sadly my wepbage is hosted through homestead and they do not have .php functionality. Was just hoping there was a workaround. Thanks for the responses.
If your server can run php then the following page can be requested when the user clicks submit. (using post method)
<?php
$in = $_POST['name'];
$file = 'names.txt';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current .= $in;
// Write the contents back to the file
file_put_contents($file, $current);
?>
You would have to use PHP to do this. Make the form action on your form link to a PHP script and inside have something like this.
<?php
$file = 'test.txt';
$currentText = file_get_contents($file);
$currentText .= $_POST['text'];
file_put_contents($file, $currentText);
?>