I have drupal 7 installed on my live server. I want to edit the default text emails to Html emails which are present in user.module file. I tried changing the core file, deleted cache, deleted browser cache, but it does not work. I have also changed the permission to 777, but it did not work.
I know it is not a good idea to change the default core files, but is it possible to change the drupal core files ??
Thanks
Update
I have installed Html mail module, and i can change the look of the html, however i wish to change the actual text of the default emails.
Update 2
As mentioned in the answer below, i tried checking the the settings page in Drupal, however i could not get the forget password email and new comment email text. Is it possible to add this or edit this using the HTML mail module??
It is really simple.
Goto http://www.yourdomain.com/admin/config/people/accounts/settings
There is an "Emails" section in which you can edit all emails sent by the core user module.
Add HTML Mail module to be sure that Drupal will add the good headers and you are done !
It's definitely possible, at the end of the day the Drupal core files are just plain old PHP. While it's an extremely bad idea to hack core files (it sounds like you already know why) all you'd need to do is change the code to do what you want it to do.
The good news though is that someone has already written a module to do what you want: HTML Mail.
This module allows you to theme emails leaving the system as you would theme a normal Drupal site, and replaces the outgoing emails with those HTML versions per your settings.
All the emails are being sent from the system and the content is editable as we want. To stylize the emails, i am using html mail module as suggested by CLive.
The new account creation, account cancellation emails can be found in "Account settings" page when you login as a admin.
All other emails are set from "Actions" settings page.
I could use html tags in the emails content, i think it worked because i was using html mail module.
I hope this comment helps someone trying to change the core email content from drupal.
Related
All..
I am asking this question, and yes it might look like a newbie posting a question without search first, but I have a caveat that I need to be considered before marking this as a repeat or duplicate of similar posted questions!
I have "googled" and searched on stackoverflow, and tried just about every combination of parameters and methods to get an email sent by either mail, mailx, or sendmail (don't care, will even consider other methods), and have the client recognize the email as HTML and properly display the message along with an attachment.
My request is to find a way to send an HTML email AND attach a file at the same time, with a single command.
I am using mail and mailx "12.4 7/29/08", and I can not figure out what version of sendmail. I am using "Linux 2.6.32-504.8.1.el6.x86_64" (RHEL 6.6 Santiago) build of RHEL.
Looking for any of the following?
How does one find a program that will allow me to send an email with HTML, attach a file and have it be detected my the email client as HTML with an attachment?
Format a message and its "body" content, and manually encode a file to be attached so that can be sent and have it be detected my the email client as HTML with an attachment?
Combination of both of the above?
I am stumped. Many of the posts I found have told me there is a large variety of mail and mailx versions and distributions that have different patterns. I am not porting this from machine to machine, and not looking for portable bash script code. However, I like writing clean code that is fairly portable and standard, but that would be like having my pie and eating it too! :-)
Mailx html content is in this theme Mailx send html message
Attachment her http://www.unix.com/solaris/183753-mailx-attachment.html
I understood this correctly?
From the google site, I cam across a code that lets me display the recaptcha box. Although I must admit I have only started html today and hence, have no basics at all. The site does not have a verify code in html although it does in jsp and I dont know how to link it all since data from the html went to the servlet.
https://developers.google.com/recaptcha/docs/verify
specifis a list of parameters to be 'posted'
I am using Tomcat 7 and no Spring.
My doubts:
Can I have multiple forms in an html file
How do i send parameters from the precious form to the second form?
How do I link a jsp file that will verify it to be run through the java class invoked by the html file
How do I get the user (accessing my app through a local server) remote IP address?
Got sorted out. Since I did not understand the problem in that, I proceeded to simple captcha itself. I must admit I feel like a fool saying I din't know html/jsp. The second day it was all so clear. I must have been positively psyched. Unwilling to see the not working code again, I started fresh.
Answers :
I can have multiple forms in a html
as set and get parameter as a session and request functions respectively.
through a form itself or response.sendredirect("")
Remote address class and methods.
I'm very new to ColdFusion (this is my second day dealing with it) and I am implementing a simple HTML page. I have a feedback form on this page and when the user hits submit, I want to email the contents of the form to myself. I have to do it using cfmail.
To try it out before I implemented it, I created the following cfmail.cfm file:
<cfmail from="#form.from#" to="myemailaddress" type="html">
Some text
</cfmail>
and passed the name of the file to the action attribute of my form. Every time I click submit on my form, it just opens the above file.
All the examples I find online pretty much show the same thing, but obviously I'm way off here.
Am I using cfmail in the wrong manner?
Thanks in advance for your help!
Just like Evik said in the comments, add a subject because it is a required field for the cfmail tag.
<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#">
#form.body#
</cfmail>
Also check the mail settings in the ColdFusion administrator under Setting > Mail. There is also a mail log in the administrator you can check.
I recommend using Adobe online docs for ColdFusion. I referrer to it almost daily, they are great.
Here is a link to the cfmail for CF8 but at the bottom it links to other version.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_01.html
If it's just opening the file and not throwing a ColdFusion error (which it should do without the subject) then you most likely have a problem in your ColdFusion installation or more likely in the setup of your development web server is not handling the cfm scripts (IIS or Apache depending on the platform).
I want to build a blog with only HTML, meaning that no database, no PHP, just plain HTML.
Is it possible to do that?
It may be weird, but I just want to build a very simple blog that just require 2 functions:
create new post
comment
It will be hosted in Azure Blob, so no PHP, no database.
Thanks.
Of course. People did it in 1996 all the time.
Create new post:
Open blog.html in notepad.
Code new blog post above the latest
Save blog.html, upload.
Comment:
"Woah, this blog is epic."
Well I guess its not a good idea but if you have to do this you'll have to work a few things manually.
You will
Create blog posts manually using any HTML editor and upload updated HTML pages to server manually.
For comments you can create a "send to email" form (http://www.tizag.com/htmlT/forms.php) and receive comments in email. After user posts comments you can show a message saying the comment is sent for moderation.
After you receive a comment in email you'll have to update it in HTML manually.
Javascript or Jquery can be used for some enhancements in the process. Hope this works. :)
No.
How do you save the posts? Only serverside scripting will make this possible.
I have a new client who asked me to make 2 websites and no payment so far!
I have the ftp accounts, but he can always close my access and leave me without pay.
Can I upload the CSS to another server of mine and encrypt the link to CSS file?
If yes, can I restrict peoples to see the file if they find the URL to CSS file?
Thank you!
If they are his hosting accounts, then accessing them to tamper with the code for the purpose of disabling his sites without his authorisation is probably illegal.
If he hasn't paid you, you own the copyright. If he refuses to pay you, file a DMCA complaint with his hosting company.
Technological measures like this are futile and unprofessional. Next time use a contract.
This is simple. Same scenario happened to me, and what I did was added an new index.html which was an under-construction page, and renamed the original index.php as index_to_be.php.
I then added a redirection using htaccess to the new index.html.
The client contacted me straight away and paid up in no time.
If you don't know how to use htaccess, you can simply add a header location value to the top php page.
header("location:index.html");
The best way to do this is to create a simple PHP file that allows you to access, edit and delete files on the server. You can also search for a ready made lightweight ftp script. Place the PHP file somewhere on the server nested in other folders and name it something like temp.php. Now even if the client blocked you access to the server, you can still access, edit and delete files on the server by pointing your URL to temp.php. When you get paid, be kind enough to remove the file. Don't forget to password protect it.
In your PHP file you can use opendir() to read files from a directory, and unlink() to delete files. If all you want to do is be able to delete files, then the script will not take you more then a minute to create.
UPDATE
You can use the following lightweight ftp script that will let you view, edit delete files and also give you the option to password protect it. http://sourceforge.net/projects/pafm/
You could remove the style sheet from the client's site, upload it to one of your servers and embed it from there:
<link rel="stylesheet" href="http://your.server/styles.css">
however, you will not be able to seriously obfuscate this. One idea that comes to mind is to add a huge number of spaces before the "link" tag to hide it in the source code view.
<link rel="stylesheet".....>
You could also lazy load it using jQuery, but that would disable the style sheet for users who have JavaScript turned off - mostly a no-go.
In the end, no matter what you do, all this will be trivially easy to circumvent. There is no way to reliably keep control over the site in the scenario you describe. Like #thirtydot says, the best thing to do is to send a screenshot instead.
This is probably like trying to kill a fly with a ICBM but...
You could always use a JavaScript to add the link element to the DOM, and run the JavaScript code through a JS obfusticator.
But still, that's hackish, and overkill, and ways you can get the link anyway.