I am relatively new to programming. Basically I need to make a small program that produces a text file out of it, but with the extension .list

The interface would need to show details like server ip, port, security key and then these details would just be combined in a simple way to produce the text file.

Eventually a more complex program would be something then that would automatically email this out to customers with a template email message and all the files as attachements.

So for a beginner with little experience in programming what would be the best way to setup such a program? The email functionality is not hugely important yet as I can do it manually.

Is there any template packages that I can change easily? I am looking for a quick and simple solution to this, something that would save me a lot of time.