By is used when we talk about the person who did something or the method by which it was done.
Via is used when we talk about the channel or route something was done.
- The book was written by the author.
(emphasis on the person/the author) - She paid for the tickets by credit card.
(emphasis on the payment method) - I went to Liverpool by car.
(emphasis on the transport method) - She paid for the tickets via their website.
(emphasis on the payment channel) - I received the information via an e-mail.
(emphasis on the communication channel) - I went to Liverpool via Manchester.
(emphasis on the route)
Common mistakes with prepositions.